From 604cb211a9b5401b265d1c1ca3d57dad243e7260 Mon Sep 17 00:00:00 2001 From: Alan Chandler Date: Tue, 3 Oct 2006 22:48:46 +0100 Subject: [PATCH 1/5] Update the gitweb/README file to include setting the GITWEB_CONFIG environment Signed-off-by: Alan Chandler Signed-off-by: Junio C Hamano --- gitweb/README | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gitweb/README b/gitweb/README index 61c7ab5d4b..78e6fc05f3 100644 --- a/gitweb/README +++ b/gitweb/README @@ -43,6 +43,7 @@ repositories, you can configure apache like this: DocumentRoot /pub/git RewriteEngine on RewriteRule ^/(.*\.git/(?!/?(info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT] + SetEnv GITWEB_CONFIG /etc/gitweb.conf The above configuration expects your public repositories to live under @@ -51,6 +52,12 @@ both as cloneable GIT URL and as browseable gitweb interface. If you then start your git-daemon with --base-path=/pub/git --export-all then you can even use the git:// URL with exactly the same path. +Setting the environment variable GITWEB_CONFIG will tell gitweb to use +the named file (i.e. in this example /etc/gitweb.conf) as a +configuration for gitweb. Perl variables defined in here will +override the defaults given at the head of the gitweb.perl (or +gitweb.cgi). Look at the comments in that file for information on +which variables and what they mean. Originally written by: From 281e67d6fa8e523147792c17fbe6db03f13f72e1 Mon Sep 17 00:00:00 2001 From: Alan Chandler Date: Tue, 3 Oct 2006 21:11:25 +0100 Subject: [PATCH 2/5] Fix usage string to match that given in the man page Still not managed to understand git-send-mail sufficiently well to not accidently miss of this list when I sending it to Junio Signed-off-by: Alan Chandler Signed-off-by: Junio C Hamano --- git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.c b/git.c index ae80e78456..b8e8622afb 100644 --- a/git.c +++ b/git.c @@ -16,7 +16,7 @@ #include "builtin.h" const char git_usage_string[] = - "git [--version] [--exec-path[=GIT_EXEC_PATH]] [--help] COMMAND [ ARGS ]"; + "git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate] [--bare] [--git-dir=GIT_DIR] [--help] COMMAND [ARGS]"; static void prepend_to_path(const char *dir, int len) { From c065b6e4293f856012ec53fcff7bf4d47ac50927 Mon Sep 17 00:00:00 2001 From: Martin Waitz Date: Tue, 3 Oct 2006 18:38:25 +0200 Subject: [PATCH 3/5] git-commit: cleanup unused function. The report() function is not used anymore. Kill it. Signed-off-by: Martin Waitz Signed-off-by: Junio C Hamano --- git-commit.sh | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/git-commit.sh b/git-commit.sh index 5a4c659b6f..6f6cbda898 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -32,33 +32,6 @@ save_index () { cp -p "$THIS_INDEX" "$NEXT_INDEX" } -report () { - header="# -# $1: -# ($2) -# -" - trailer="" - while read status name newname - do - printf '%s' "$header" - header="" - trailer="# -" - case "$status" in - M ) echo "# modified: $name";; - D*) echo "# deleted: $name";; - T ) echo "# typechange: $name";; - C*) echo "# copied: $name -> $newname";; - R*) echo "# renamed: $name -> $newname";; - A*) echo "# new file: $name";; - U ) echo "# unmerged: $name";; - esac - done - printf '%s' "$trailer" - [ "$header" ] -} - run_status () { # If TMP_INDEX is defined, that means we are doing # "--only" partial commit, and that index file is used From 91b489776c25866568c081e8cf4ae83fa41f8707 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Tue, 3 Oct 2006 17:29:26 +0100 Subject: [PATCH 4/5] git-rebase: Use --ignore-if-in-upstream option when executing git-format-patch. This reduces the number of conflicts when rebasing after a series of patches to the same piece of code is committed upstream. Signed-off-by: Robert Shearman Signed-off-by: Junio C Hamano --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase.sh b/git-rebase.sh index a7373c0532..413636e208 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -286,7 +286,7 @@ fi if test -z "$do_merge" then - git-format-patch -k --stdout --full-index "$upstream"..ORIG_HEAD | + git-format-patch -k --stdout --full-index --ignore-if-in-upstream "$upstream"..ORIG_HEAD | git am --binary -3 -k --resolvemsg="$RESOLVEMSG" \ --reflog-action=rebase exit $? From b758789c202dc491555b698149afe4d4941f7cd5 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Tue, 3 Oct 2006 17:29:31 +0100 Subject: [PATCH 5/5] git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase. Signed-off-by: Robert Shearman Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 5 ++++- git-rebase.sh | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 9d7bcaa38c..10f2924f4d 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -7,7 +7,7 @@ git-rebase - Rebase local commits to a new head SYNOPSIS -------- -'git-rebase' [--merge] [--onto ] [] +'git-rebase' [-v] [--merge] [--onto ] [] 'git-rebase' --continue | --skip | --abort @@ -121,6 +121,9 @@ OPTIONS is used instead (`git-merge-recursive` when merging a single head, `git-merge-octopus` otherwise). This implies --merge. +-v, \--verbose:: + Display a diffstat of what changed upstream since the last rebase. + include::merge-strategies.txt[] NOTES diff --git a/git-rebase.sh b/git-rebase.sh index 413636e208..546fa446fc 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -3,7 +3,7 @@ # Copyright (c) 2005 Junio C Hamano. # -USAGE='[--onto ] []' +USAGE='[-v] [--onto ] []' LONG_USAGE='git-rebase replaces with a new branch of the same name. When the --onto option is provided the new branch starts out with a HEAD equal to , otherwise it is equal to @@ -39,6 +39,7 @@ strategy=recursive do_merge= dotest=$GIT_DIR/.dotest-merge prec=4 +verbose= continue_merge () { test -n "$prev_head" || die "prev_head must be defined" @@ -190,6 +191,9 @@ do esac do_merge=t ;; + -v|--verbose) + verbose=t + ;; -*) usage ;; @@ -273,6 +277,12 @@ then exit 0 fi +if test -n "$verbose" +then + echo "Changes from $mb to $onto:" + git-diff-tree --stat --summary "$mb" "$onto" +fi + # Rewind the head to "$onto"; this saves our current head in ORIG_HEAD. git-reset --hard "$onto"