summaryrefslogtreecommitdiff
path: root/git-instaweb.sh
AgeCommit message (Collapse)Author
2008-07-13Make usage strings dash-lessStephan Beyer
When you misuse a git command, you are shown the usage string. But this is currently shown in the dashed form. So if you just copy what you see, it will not work, when the dashed form is no longer supported. This patch makes git commands show the dash-less version. For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh generates a dash-less usage string now. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-14git-instaweb: improve auto-discovery of httpd and call conventions.Flavio Poletti
This patch allows calling: git-instaweb -d apache2 and have the script Do The Right Thing. In particular, the auto-discovery mechanism has been extended in order to be used for module listing as well, and the call convention is that if the daemon is apache2/lighttpd and the parameter to the "-d" option does not end by "-f", the "-f" is added to the end of the option itself. Change all backticks to $( ... ) as per Documentation/CodingGuidelines. Signed-off-by: Flavio Poletti <flavio@polettix.it> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05instaweb: use 'git-web--browse' to launch browser.Christian Couder
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-29instaweb: use 'browser.<tool>.path' config option if it's set.Christian Couder
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19Fix git-instaweb breakage on MacOS X due to the limited sed functionalityCharles Bailey
git-instaweb relied on a pipe in a sed script, but this is not supported by MacOS X sed when using BREs. git-instaweb relies on a working perl in any case, and perl re are more consistent between platforms, so replace sed invocation with an equivalent perl invocation. Also, fix the documented -b "" to work without giving a spurious 'command not found' error. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-09Use {web,instaweb,help}.browser config options.Christian Couder
Now "git-instaweb" will try to use the browser configured as "web.browser", if "instaweb.browser" is not set. "git-browse-help" will check first "help.browser" and then "web.browser". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-18Merge branch 'ph/parseopt-sh'Junio C Hamano
* ph/parseopt-sh: git-quiltimport.sh fix --patches handling git-am: -i does not take a string parameter. sh-setup: don't let eval output to be shell-expanded. git-sh-setup: fix parseopt `eval` string underquoting Give git-am back the ability to add Signed-off-by lines. git-rev-parse --parseopt scripts: Add placeholders for OPTIONS_SPEC Migrate git-repack.sh to use git-rev-parse --parseopt Migrate git-quiltimport.sh to use git-rev-parse --parseopt Migrate git-checkout.sh to use git-rev-parse --parseopt --keep-dashdash Migrate git-instaweb.sh to use git-rev-parse --parseopt Migrate git-merge.sh to use git-rev-parse --parseopt Migrate git-am.sh to use git-rev-parse --parseopt Migrate git-clone to use git-rev-parse --parseopt Migrate git-clean.sh to use git-rev-parse --parseopt. Update git-sh-setup(1) to allow transparent use of git-rev-parse --parseopt Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.
2007-11-09Merge branch 'maint'Junio C Hamano
* maint: Start preparing for 1.5.3.6 git-send-email: Change the prompt for the subject of the initial message. SubmittingPatches: improve the 'Patch:' section of the checklist instaweb: Minor cleanups and fixes for potential problems stop t1400 hiding errors in tests Makefile: add missing dependency on wt-status.h refresh_index_quietly(): express "optional" nature of index writing better Fix sed string regex escaping in module_name. Avoid a few unportable, needlessly nested "...`...". git-mailsplit: with maildirs not only process cur/, but also new/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-09instaweb: Minor cleanups and fixes for potential problemsJonas Fonseca
Fix path quoting and test of empty values that some shells do not like. Remove duplicate check and setting of $browser. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06Migrate git-instaweb.sh to use git-rev-parse --parseoptPierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-17Merge branch 'maint'Shawn O. Pearce
* maint: Document additional 1.5.3.5 fixes in release notes Avoid 'expr index' on Mac OS X as it isn't supported filter-branch: update current branch when rewritten fix filter-branch documentation helpful error message when send-pack finds no refs in common. Fix setup_git_directory_gently() with relative GIT_DIR & GIT_WORK_TREE Correct typos in release notes for 1.5.3.5
2007-10-17Avoid 'expr index' on Mac OS X as it isn't supportedShawn O. Pearce
This fixes git-instaweb so it can start an httpd without warning about an invalid test command. Yes its ugly, but its also quite portable. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-16instaweb: support for Ruby's WEBrick serverMike Dalessio
running the webrick server with git requires Ruby and Ruby's YAML and Webrick libraries (both of which come standard with Ruby). nice for single-user standalone invocations. the --httpd=webrick option generates a ruby script on the fly to read httpd.conf options and invoke the web server via library call. this script is placed in the .git/gitweb directory. it also generates a shell script in a feeble attempt to invoke ruby in a portable manner, which assumes that 'ruby' is in the user's $PATH. Signed-off-by: Mike Dalessio <mike@csa.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-16instaweb: allow for use of auto-generated scriptsMike Dalessio
this patch allows scripts that reside in $fqgitdir/gitweb to be used for firing up an instaweb server. this lays the groundwork for extending instaweb support to non-standard web servers, which may require a script for proper invocation. Signed-off-by: Mike Dalessio <mike@csa.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-23Supplant the "while case ... break ;; esac" idiomDavid Kastrup
A lot of shell scripts contained stuff starting with while case "$#" in 0) break ;; esac and similar. I consider breaking out of the condition instead of the body od the loop ugly, and the implied "true" value of the non-matching case is not really obvious to humans at first glance. It happens not to be obvious to some BSD shells, either, but that's because they are not POSIX-compliant. In most cases, this has been replaced by a straight condition using "test". "case" has the advantage of being faster than "test" on vintage shells where "test" is not a builtin. Since none of them is likely to run the git scripts, anyway, the added readability should be worth the change. A few loops have had their termination condition expressed differently. Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-14git-sh-setup.sh: make GIT_DIR absoluteDavid Kastrup
Quite a few of the scripts are rather careless about using GIT_DIR while changing directories. Some try their hands (with different likelihood of success) in making GIT_DIR absolute. This patch lets git-sh-setup.sh cater for absolute directories (in a way that should work reliably also with non-Unix path names) and removes the respective kludges in git-filter-branch.sh and git-instaweb.sh. Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-01-29[PATCH] Rename git-repo-config to git-config.Tom Prince
Signed-off-by: Tom Prince <tom.prince@ualberta.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06instaweb: Nicer error message when the http daemon isn't foundFredrik Kuivinen
Signed-off-by: Fredrik Kuivinen <frekui@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-03instaweb: load Apache mime and dir modules if they are neededEric Wong
I've noticed that Apache 2.2 on a Debian etch machine has these compiled as modules. Also set ServerName to avoid a warning at startup. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-26instaweb: Be more clear if httpd or the browser failJohannes Schindelin
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-26git-instaweb: some Apache have mod_cgi builtinJohannes Schindelin
So test for it, and do not always try to load mod_cgi.o. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Fix more typos, primarily in the codePavel Roskin
The only visible change is that git-blame doesn't understand "--compability" anymore, but it does accept "--compatibility" instead, which is already documented. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-02instaweb: fix unportable ';' usage in sedEric Wong
Hint taken from Johannes. I've tested this with sed --posix on my system with GNU sed and it works fine with and also without it. Further portability testing/review would be good. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-02Add git-instaweb, instantly browse the working repo with gitwebEric Wong
I got tired of having to configure gitweb for every repository I work on. I sometimes prefer gitweb to standard GUIs like gitk or gitview; so this lets me automatically configure gitweb to browse my working repository and also opens my browser to it. Updates from the original patch: Added Apache/mod_perl2 compatibility if Dennis Stosberg's gitweb has been applied, too: <20060621130708.Gcbc6e5c@leonov.stosberg.net> General cleanups in shell code usage. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>