From c0d4528119c237a9939175adcf0113ee43a20438 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 21 Jan 2008 22:23:53 -0500 Subject: [PATCH 01/21] t9001: add missing && operators The exit value of some commands was not being used for the test output. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t9001-send-email.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 4f6822f2c5..08f7c3d8d7 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -8,7 +8,7 @@ test_expect_success \ 'prepare reference tree' \ 'echo "1A quick brown fox jumps over the" >file && echo "lazy dog" >>file && - git add file + git add file && GIT_AUTHOR_NAME="A" git commit -a -m "Initial."' test_expect_success \ @@ -20,9 +20,9 @@ test_expect_success \ echo " echo \"!\$a!\"" echo "done >commandline" echo "cat > msgtxt" - ) >fake.sendmail - chmod +x ./fake.sendmail - git add fake.sendmail + ) >fake.sendmail && + chmod +x ./fake.sendmail && + git add fake.sendmail && GIT_AUTHOR_NAME="A" git commit -a -m "Second."' test_expect_success 'Extract patches' ' From 752527f51396886c4ca11a14bfcecf2167ed4c40 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 28 Jan 2008 16:33:28 +0000 Subject: [PATCH 02/21] Add test for rebase -i with commits that do not pass pre-commit This accompanies c5b09feb786f6a2456ec3d8203d0f4d67f09f043 (Avoid update hook during git-rebase --interactive) to make sure that any regression to make Debian's Bug#458782 (git-core: git-rebase doesn't work when trying to squash changes into commits created with --no-verify) resurface will be caught. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t3404-rebase-interactive.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 74a7eb30f8..e33ea4e9f4 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -324,4 +324,20 @@ test_expect_success 'rebase a detached HEAD' ' test $grandparent = $(git rev-parse HEAD~2) ' +test_expect_success 'rebase a commit violating pre-commit' ' + + mkdir -p .git/hooks && + PRE_COMMIT=.git/hooks/pre-commit && + echo "#!/bin/sh" > $PRE_COMMIT && + echo "test -z \"\$(git diff --cached --check)\"" >> $PRE_COMMIT && + chmod a+x $PRE_COMMIT && + echo "monde! " >> file1 && + test_tick && + ! git commit -m doesnt-verify file1 && + git commit -m doesnt-verify --no-verify file1 && + test_tick && + FAKE_LINES=2 git rebase -i HEAD~2 + +' + test_done From 584627b4a6a72a80e51e115d992c731d53acbb4a Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Tue, 29 Jan 2008 07:08:22 +0100 Subject: [PATCH 03/21] Documentation: config: add "browser..path". Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Documentation/config.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 877eda960d..477b2d9138 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -367,6 +367,10 @@ branch..rebase:: it unless you understand the implications (see linkgit:git-rebase[1] for details). +browser..path:: + Override the path for the given tool that may be used to + browse HTML help. See '-w' option in linkgit:git-help[1]. + clean.requireForce:: A boolean to make git-clean do nothing unless given -f or -n. Defaults to true. From f7ff09d7188aaa60710aa2e6d0da19b70adac2f1 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Tue, 29 Jan 2008 07:08:29 +0100 Subject: [PATCH 04/21] Documentation: help: specify supported html browsers. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Documentation/git-help.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt index 09904c75c4..fb77ca3a57 100644 --- a/Documentation/git-help.txt +++ b/Documentation/git-help.txt @@ -58,6 +58,16 @@ is available in PATH. + Note that the script tries, as much as possible, to display the HTML page in a new tab on an already opened browser. ++ +The following browsers are currently supported by 'git-help--browse': ++ +* firefox (this is the default under X Window when not using KDE) +* iceweasel +* konqueror (this is the default under KDE) +* w3m (this is the default outside X Window) +* links +* lynx +* dillo CONFIGURATION VARIABLES ----------------------- From ab989adf6ab32fb80fd42cc95ed0eacb029258fe Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Tue, 29 Jan 2008 07:08:44 +0100 Subject: [PATCH 05/21] instaweb: use 'browser..path' config option if it's set. Signed-off-by: Christian Couder Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- Documentation/config.txt | 3 ++- git-instaweb.sh | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 477b2d9138..4e222f15a5 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -369,7 +369,8 @@ branch..rebase:: browser..path:: Override the path for the given tool that may be used to - browse HTML help. See '-w' option in linkgit:git-help[1]. + browse HTML help (see '-w' option in linkgit:git-help[1]) or a + working repository in gitweb (see linkgit:git-instaweb[1]). clean.requireForce:: A boolean to make git-clean do nothing unless given -f diff --git a/git-instaweb.sh b/git-instaweb.sh index ad0723ccc6..3e4452bc4b 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -274,6 +274,14 @@ webrick) ;; esac +init_browser_path() { + browser_path="`git config browser.$1.path`" + test -z "$browser_path" && browser_path="$1" +} + start_httpd url=http://127.0.0.1:$port -test -n "$browser" && "$browser" $url || echo $url +test -n "$browser" && { + init_browser_path "$browser" + "$browser_path" $url +} || echo $url From 7720224cebde08186627ab7bdb06018905d84e30 Mon Sep 17 00:00:00 2001 From: Yasushi SHOJI Date: Tue, 29 Jan 2008 21:16:02 +0900 Subject: [PATCH 06/21] gitweb: Convert generated contents to utf8 in commitdiff_plain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the commit message, or commit author contains non-ascii, it must be converted from Perl internal representation to utf-8, to follow what got declared in HTTP header. Use to_utf8() to do the conversion. This necessarily replaces here-doc with "print" statements. Signed-off-by: Yasushi SHOJI Acked-by: İsmail Dönmez Acked-by: Jakub Narebski Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 6256641ace..80e3d0ac47 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -5048,16 +5048,15 @@ sub git_commitdiff { -expires => $expires, -content_disposition => 'inline; filename="' . "$filename" . '"'); my %ad = parse_date($co{'author_epoch'}, $co{'author_tz'}); - print <self_url() . "\n\n"; foreach my $line (@{$co{'comment'}}) { - print "$line\n"; + print to_utf8($line) . "\n"; } print "---\n\n"; } From bda3a31cc7982a7ef8ddb5137359d27c3c75ebed Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 25 Jan 2008 23:53:05 -0800 Subject: [PATCH 07/21] reflog-expire: Avoid creating new files in a directory inside readdir(3) loop "git reflog expire --all" opened a directory in $GIT_DIR/logs/, read reflog files in there readdir(3), and rewrote the file by creating a new file and renaming it back inside the loop. This code structure can cause the newly created file to be returned by subsequent call to readdir(3), and fall into an infinite loop in the worst case. This separates the processing to two phase. Running for_each_reflog() to find out and collect all refs, and then iterate over them, calling expire_reflog(). This way, the program would behave exactly the same way as if all the refs were given by the user from the command line. Signed-off-by: Junio C Hamano --- builtin-reflog.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/builtin-reflog.c b/builtin-reflog.c index ce093cad78..e6834dd831 100644 --- a/builtin-reflog.c +++ b/builtin-reflog.c @@ -34,6 +34,16 @@ struct expire_reflog_cb { struct cmd_reflog_expire_cb *cmd; }; +struct collected_reflog { + unsigned char sha1[20]; + char reflog[FLEX_ARRAY]; +}; +struct collect_reflog_cb { + struct collected_reflog **e; + int alloc; + int nr; +}; + #define INCOMPLETE (1u<<10) #define STUDYING (1u<<11) @@ -281,6 +291,20 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused, return status; } +static int collect_reflog(const char *ref, const unsigned char *sha1, int unused, void *cb_data) +{ + struct collected_reflog *e; + struct collect_reflog_cb *cb = cb_data; + size_t namelen = strlen(ref); + + e = xmalloc(sizeof(*e) + namelen + 1); + hashcpy(e->sha1, sha1); + memcpy(e->reflog, ref, namelen + 1); + ALLOC_GROW(cb->e, cb->nr + 1, cb->alloc); + cb->e[cb->nr++] = e; + return 0; +} + static int reflog_expire_config(const char *var, const char *value) { if (!strcmp(var, "gc.reflogexpire")) @@ -349,8 +373,20 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix) putchar('\n'); } - if (do_all) - status |= for_each_reflog(expire_reflog, &cb); + if (do_all) { + struct collect_reflog_cb collected; + int i; + + memset(&collected, 0, sizeof(collected)); + for_each_reflog(collect_reflog, &collected); + for (i = 0; i < collected.nr; i++) { + struct collected_reflog *e = collected.e[i]; + status |= expire_reflog(e->reflog, e->sha1, 0, &cb); + free(e); + } + free(collected.e); + } + while (i < argc) { const char *ref = argv[i++]; unsigned char sha1[20]; From a5d86f7406ecda78b44faf9ab50b7c6e419dba9d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 29 Jan 2008 20:38:55 +0100 Subject: [PATCH 08/21] fix doc typos Signed-off-by: Jim Meyering Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.3.3.txt | 2 +- Documentation/git-config.txt | 2 +- Documentation/git-cvsserver.txt | 4 ++-- Documentation/git-rev-parse.txt | 6 +++--- Documentation/technical/racy-git.txt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/RelNotes-1.5.3.3.txt b/Documentation/RelNotes-1.5.3.3.txt index 2a7bfdd5cc..d213846951 100644 --- a/Documentation/RelNotes-1.5.3.3.txt +++ b/Documentation/RelNotes-1.5.3.3.txt @@ -12,7 +12,7 @@ Fixes since v1.5.3.2 * The default shell on some FreeBSD did not execute the argument parsing code correctly and made git unusable. - * git-svn incorrectly spawned pager even when the user user + * git-svn incorrectly spawned pager even when the user explicitly asked not to. * sample post-receive hook overquoted the envelope sender diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index e4d0e47529..fa161718dd 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -130,7 +130,7 @@ See also <>. -z, --null:: For all options that output values and/or keys, always - end values with with the null character (instead of a + end values with the null character (instead of a newline). Use newline instead as a delimiter between key and value. This allows for secure parsing of the output without getting confused e.g. by values that diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt index d75e401343..c831548d4a 100644 --- a/Documentation/git-cvsserver.txt +++ b/Documentation/git-cvsserver.txt @@ -204,7 +204,7 @@ about `DBI->connect()`. gitcvs.dbname:: Database name. The exact meaning depends on the - used database driver, for SQLite this is a filename. + selected database driver, for SQLite this is a filename. Supports variable substitution (see below). May not contain semicolons (`;`). Default: '%Ggitcvs.%m.sqlite' @@ -215,7 +215,7 @@ gitcvs.dbdriver:: with 'DBD::SQLite', reported to work with 'DBD::Pg', and reported *not* to work with 'DBD::mysql'. Please regard this as an experimental feature. May not - contain double colons (`:`). + contain colons (`:`). Default: 'SQLite' gitcvs.dbuser:: diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 5d9c36985f..af988821b8 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -229,13 +229,13 @@ blobs contained in a commit. * A colon, optionally followed by a stage number (0 to 3) and a colon, followed by a path; this names a blob object in the index at the given path. Missing stage number (and the colon - that follows it) names an stage 0 entry. During a merge, stage + that follows it) names a stage 0 entry. During a merge, stage 1 is the common ancestor, stage 2 is the target branch's version (typically the current branch), and stage 3 is the version from the branch being merged. Here is an illustration, by Jon Loeliger. Both node B and C are -a commit parents of commit node A. Parent commits are ordered +commit parents of commit node A. Parent commits are ordered left-to-right. G H I J @@ -291,7 +291,7 @@ and its parent commits exists. `r1{caret}@` notation means all parents of `r1`. `r1{caret}!` includes commit `r1` but excludes its all parents. -Here are a handful examples: +Here are a handful of examples: D G H D D F G H I J D F diff --git a/Documentation/technical/racy-git.txt b/Documentation/technical/racy-git.txt index 5030d9f2f8..6bdf034b3a 100644 --- a/Documentation/technical/racy-git.txt +++ b/Documentation/technical/racy-git.txt @@ -184,7 +184,7 @@ In a large project where raciness avoidance cost really matters, however, the initial computation of all object names in the index takes more than one second, and the index file is written out after all that happens. Therefore the timestamp of the -index file will be more than one seconds later than the the +index file will be more than one seconds later than the youngest file in the working tree. This means that in these cases there actually will not be any racily clean entry in the resulting index. From d661146ac2ada526e80dbb6234f8f8da6642ffcb Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Tue, 29 Jan 2008 20:52:32 +0100 Subject: [PATCH 09/21] gitweb: Add info about $projectroot and $projects_list to gitweb/README Those two configuration variables are important enough that it is worth to explicitely write about them in the "Gitweb config file variables" section even if they are usually set during build by GITWEB_PROJECTROOT and GITWEB_LIST build (Makefile) configuration variables. Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- gitweb/README | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gitweb/README b/gitweb/README index b28f59f574..4c8bedf744 100644 --- a/gitweb/README +++ b/gitweb/README @@ -129,17 +129,30 @@ descriptions. Gitweb config file variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can set, among others, the following variables in gitweb config files: +You can set, among others, the following variables in gitweb config files +(with the exception of $projectroot and $projects_list this list does +not include variables usually directly set during build): * $GIT Cure git executable to use. By default set to "$GIT_BINDIR/git", which in turn is by default set to "$(bindir)/git". If you use git from binary package, set this to "/usr/bin/git". This can just be "git" if your webserver has a sensible PATH. If you have multiple git versions - installed it is / can be used to choose which one to use. + installed it can be used to choose which one to use. * $version Gitweb version, set automatically when creating gitweb.cgi from gitweb.perl. You might want to modify it if you are running modified gitweb. + * $projectroot + Absolute filesystem path which will be prepended to project path; + the path to repository is $projectroot/$project. Set to + $GITWEB_PROJECTROOT during installation. This variable have to be + set correctly for gitweb to find repositories. + * $projects_list + Source of projects list, either directory to scan, or text file + with list of repositories (in the " SPC + " format). Set to $GITWEB_LIST + during installation. If empty, $projectroot is used to scan for + repositories. * $my_url, $my_uri URL and absolute URL of gitweb script; you might need to set those variables if you are using 'pathinfo' feature: see also below. From c1dcf7ebf222e7c24b89b40bc00a6ca5e9e2eec6 Mon Sep 17 00:00:00 2001 From: Bruno Ribas Date: Wed, 30 Jan 2008 03:37:56 -0200 Subject: [PATCH 10/21] gitweb: Make use of the $git_dir variable at sub git_get_project_description Signed-off-by: Bruno Ribas Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 80e3d0ac47..ae2d05763f 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1606,7 +1606,7 @@ sub git_get_project_description { my $path = shift; $git_dir = "$projectroot/$path"; - open my $fd, "$projectroot/$path/description" + open my $fd, "$git_dir/description" or return git_get_project_config('description'); my $descr = <$fd>; close $fd; From 0eab8ca68ad7bfcbb7c0aff37985116cbbdacd44 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Tue, 29 Jan 2008 16:41:30 -0600 Subject: [PATCH 11/21] git-relink: avoid hard linking in objects/info directory git-relink is intended to search for packs and loose objects in common between two repositories and to replace the one set with hard links to the other. Files other than packs and loose objects should not be touched, so add the "info" sub-directory to the pattern of directory excludes. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- git-relink.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-relink.perl b/git-relink.perl index f6b4f6a2f8..15fb932021 100755 --- a/git-relink.perl +++ b/git-relink.perl @@ -40,7 +40,7 @@ my $master_dir = pop @dirs; opendir(D,$master_dir . "objects/") or die "Failed to open $master_dir/objects/ : $!"; -my @hashdirs = grep !/^\.{1,2}$/, readdir(D); +my @hashdirs = grep { ($_ eq 'pack') || /^[0-9a-f]{2}$/ } readdir(D); foreach my $repo (@dirs) { $linked = 0; From def16e71819833d507a97a645366c569939dce73 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Mon, 28 Jan 2008 15:16:02 -0600 Subject: [PATCH 12/21] filter-branch.sh: remove temporary directory on failure One of the first things filter-branch does is to create a temporary directory. This directory is eventually removed by the script during normal operation, but is not removed if the script encounters an error. Set a trap to remove it when the script terminates for any reason. Signed-off-by: Brandon Casey Acked-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- git-filter-branch.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git-filter-branch.sh b/git-filter-branch.sh index ebf05ca600..fbb948d6fd 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -189,6 +189,9 @@ cd "$tempdir/t" && workdir="$(pwd)" || die "" +# Remove tempdir on exit +trap 'cd ../..; rm -rf "$tempdir"' 0 + # Make sure refs/original is empty git for-each-ref > "$tempdir"/backup-refs while read sha1 type name @@ -406,6 +409,8 @@ fi cd ../.. rm -rf "$tempdir" +trap - 0 + unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE test -z "$ORIG_GIT_DIR" || GIT_DIR="$ORIG_GIT_DIR" && export GIT_DIR test -z "$ORIG_GIT_WORK_TREE" || GIT_WORK_TREE="$ORIG_GIT_WORK_TREE" && From 733f1815abf99fe43eb8a9d6df5e0466751e6ba3 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 30 Jan 2008 01:21:56 -0500 Subject: [PATCH 13/21] Use 'printf %s $x' notation in t5401 We only care about getting what should be an empty string and sending it to a file, without a trailing LF, so the empty string translates into a 0 byte file. Earlier when I originally wrote these lines Mac OS X allowed the format string of printf to be the empty string, but more recent versions appear to have been 'improved' with error messages if the format is not given. This may cause problems if we ever wind up with changes to the hook tests. A minor cleanup makes the test more safe on all systems, by conforming to accepted printf conventions. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- t/t5401-update-hooks.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh index 3eea3069eb..9734fc542f 100755 --- a/t/t5401-update-hooks.sh +++ b/t/t5401-update-hooks.sh @@ -25,7 +25,7 @@ test_expect_success setup ' cat >victim/.git/hooks/pre-receive <<'EOF' #!/bin/sh -printf "$@" >>$GIT_DIR/pre-receive.args +printf %s "$@" >>$GIT_DIR/pre-receive.args cat - >$GIT_DIR/pre-receive.stdin echo STDOUT pre-receive echo STDERR pre-receive >&2 @@ -35,7 +35,7 @@ chmod u+x victim/.git/hooks/pre-receive cat >victim/.git/hooks/update <<'EOF' #!/bin/sh echo "$@" >>$GIT_DIR/update.args -read x; printf "$x" >$GIT_DIR/update.stdin +read x; printf %s "$x" >$GIT_DIR/update.stdin echo STDOUT update $1 echo STDERR update $1 >&2 test "$1" = refs/heads/master || exit @@ -44,7 +44,7 @@ chmod u+x victim/.git/hooks/update cat >victim/.git/hooks/post-receive <<'EOF' #!/bin/sh -printf "$@" >>$GIT_DIR/post-receive.args +printf %s "$@" >>$GIT_DIR/post-receive.args cat - >$GIT_DIR/post-receive.stdin echo STDOUT post-receive echo STDERR post-receive >&2 @@ -54,7 +54,7 @@ chmod u+x victim/.git/hooks/post-receive cat >victim/.git/hooks/post-update <<'EOF' #!/bin/sh echo "$@" >>$GIT_DIR/post-update.args -read x; printf "$x" >$GIT_DIR/post-update.stdin +read x; printf %s "$x" >$GIT_DIR/post-update.stdin echo STDOUT post-update echo STDERR post-update >&2 EOF From c41b439244c51b30c60953192816afc91e552578 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Wed, 30 Jan 2008 18:41:25 -0600 Subject: [PATCH 14/21] filter-branch docs: remove brackets so not to imply revision arg is optional Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- Documentation/git-filter-branch.txt | 2 +- git-filter-branch.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt index e22dfa5803..a7f51ab4d0 100644 --- a/Documentation/git-filter-branch.txt +++ b/Documentation/git-filter-branch.txt @@ -13,7 +13,7 @@ SYNOPSIS [--msg-filter ] [--commit-filter ] [--tag-name-filter ] [--subdirectory-filter ] [--original ] [-d ] [-f | --force] - [...] + DESCRIPTION ----------- diff --git a/git-filter-branch.sh b/git-filter-branch.sh index fbb948d6fd..753bf50c6d 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -92,7 +92,7 @@ USAGE="[--env-filter ] [--tree-filter ] \ [--msg-filter ] [--commit-filter ] \ [--tag-name-filter ] [--subdirectory-filter ] \ [--original ] [-d ] [-f | --force] \ -[...]" +" OPTIONS_SPEC= . git-sh-setup From 0f047f3b47693e8f80a00bcf4af421d9d2fc7efd Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Wed, 30 Jan 2008 13:33:04 -0600 Subject: [PATCH 15/21] filter-branch: assume HEAD if no revision supplied filter-branch previously took the first non-option argument as the name for a new branch. Since dfd05e38, it now takes a revision or a revision range and modifies the current branch. Update to operate on HEAD by default to conform with standard git interface practice. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- git-filter-branch.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 753bf50c6d..ed54e20b2f 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -114,7 +114,6 @@ orig_namespace=refs/original/ force= while : do - test $# = 0 && usage case "$1" in --) shift @@ -213,7 +212,7 @@ GIT_WORK_TREE=. export GIT_DIR GIT_WORK_TREE # The refs should be updated if their heads were rewritten -git rev-parse --no-flags --revs-only --symbolic-full-name "$@" | +git rev-parse --no-flags --revs-only --symbolic-full-name --default HEAD "$@" | sed -e '/^^/d' >"$tempdir"/heads test -s "$tempdir"/heads || From c02792edd68897e42c64e250eb5d659291959ebf Mon Sep 17 00:00:00 2001 From: Jean-Luc Herren Date: Thu, 31 Jan 2008 03:06:04 +0100 Subject: [PATCH 16/21] Documentation/git-cvsserver: Fix typo Signed-off-by: Jean-Luc Herren Signed-off-by: Junio C Hamano --- Documentation/git-cvsserver.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt index c831548d4a..d3e99931d7 100644 --- a/Documentation/git-cvsserver.txt +++ b/Documentation/git-cvsserver.txt @@ -183,7 +183,7 @@ access method and requested operation. That means that even if you offer only read access (e.g. by using the pserver method), git-cvsserver should have write access to the database to work reliably (otherwise you need to make sure -that the database if up-to-date all the time git-cvsserver is run). +that the database is up-to-date any time git-cvsserver is executed). By default it uses SQLite databases in the git directory, named `gitcvs..sqlite`. Note that the SQLite backend creates From bb8eebb94f0acf9a7ec19a1815bff7c9a2d3e427 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 31 Jan 2008 13:51:42 -0800 Subject: [PATCH 17/21] Revert "filter-branch docs: remove brackets so not to imply revision arg is optional" This reverts commit c41b439244c51b30c60953192816afc91e552578, as we decided to default to HEAD when revision parameters are missing and they are no longer mandatory. --- Documentation/git-filter-branch.txt | 2 +- git-filter-branch.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt index a7f51ab4d0..e22dfa5803 100644 --- a/Documentation/git-filter-branch.txt +++ b/Documentation/git-filter-branch.txt @@ -13,7 +13,7 @@ SYNOPSIS [--msg-filter ] [--commit-filter ] [--tag-name-filter ] [--subdirectory-filter ] [--original ] [-d ] [-f | --force] - + [...] DESCRIPTION ----------- diff --git a/git-filter-branch.sh b/git-filter-branch.sh index ed54e20b2f..ff716cabb0 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -92,7 +92,7 @@ USAGE="[--env-filter ] [--tree-filter ] \ [--msg-filter ] [--commit-filter ] \ [--tag-name-filter ] [--subdirectory-filter ] \ [--original ] [-d ] [-f | --force] \ -" +[...]" OPTIONS_SPEC= . git-sh-setup From da101b82b6f639c9916ee0596c86d29410093ca5 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 31 Jan 2008 20:55:57 +0100 Subject: [PATCH 18/21] git rev-parse manpage: spelling fix Signed-off-by: Miklos Vajna Signed-off-by: Junio C Hamano --- Documentation/git-rev-parse.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index af988821b8..f02f6bbb49 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -234,8 +234,8 @@ blobs contained in a commit. (typically the current branch), and stage 3 is the version from the branch being merged. -Here is an illustration, by Jon Loeliger. Both node B and C are -commit parents of commit node A. Parent commits are ordered +Here is an illustration, by Jon Loeliger. Both commit nodes B +and C are parents of commit node A. Parent commits are ordered left-to-right. G H I J From 0509eb216fef9451845376d8c92ff585994aecd8 Mon Sep 17 00:00:00 2001 From: Michele Ballabio Date: Thu, 31 Jan 2008 22:59:11 +0100 Subject: [PATCH 19/21] Fix typo in a comment in t/test-lib.sh Signed-off-by: Michele Ballabio Signed-off-by: Junio C Hamano --- t/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 90b6844d00..142540e1b1 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -257,7 +257,7 @@ test_expect_code () { echo >&3 "" } -# Most tests can use the created repository, but some amy need to create more. +# Most tests can use the created repository, but some may need to create more. # Usage: test_create_repo test_create_repo () { test "$#" = 1 || From 7dc46429896d6292d71391ff7e5f95fec1370b51 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 1 Feb 2008 19:06:56 -0800 Subject: [PATCH 20/21] Fix "git checkout -b foo ':/substring'" Because ':/substring' extended SHA1 expression cannot take postfix modifiers such as ^{tree} and ^{commit}, we would need to do it in multiple steps. With the patch, you can start a new branch from a randomly-picked commit whose message has the named string in it. Signed-off-by: Junio C Hamano --- git-checkout.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/git-checkout.sh b/git-checkout.sh index 5621c69d86..bd74d701a1 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -71,7 +71,8 @@ while test $# != 0; do done arg="$1" -if rev=$(git rev-parse --verify "$arg^0" 2>/dev/null) +rev=$(git rev-parse --verify "$arg" 2>/dev/null) +if rev=$(git rev-parse --verify "$rev^0" 2>/dev/null) then [ -z "$rev" ] && die "unknown flag $arg" new_name="$arg" @@ -82,11 +83,11 @@ then fi new="$rev" shift -elif rev=$(git rev-parse --verify "$arg^{tree}" 2>/dev/null) +elif rev=$(git rev-parse --verify "$rev^{tree}" 2>/dev/null) then # checking out selected paths from a tree-ish. new="$rev" - new_name="$arg^{tree}" + new_name="$rev^{tree}" shift fi [ "$1" = "--" ] && shift From c3c135291a62a01f7fd385f46cde34091767259b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 1 Feb 2008 19:10:10 -0800 Subject: [PATCH 21/21] GIT 1.5.4 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.4.txt | 16 +++++----------- GIT-VERSION-GEN | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Documentation/RelNotes-1.5.4.txt b/Documentation/RelNotes-1.5.4.txt index f968fc4957..f1323b6174 100644 --- a/Documentation/RelNotes-1.5.4.txt +++ b/Documentation/RelNotes-1.5.4.txt @@ -35,7 +35,7 @@ Deprecation notices - Using dashed forms of git commands (e.g. "git-commit") from the command line has been informally deprecated since early 2006, but now it officially is, and will be removed in the future. Use - dashless forms (e.g. "git commit") instead. + dash-less forms (e.g. "git commit") instead. - Using dashed forms from your scripts, without first prepending the return value from "git --exec-path" to the scripts' PATH, has been @@ -166,7 +166,7 @@ Updates since v1.5.3 command line in the generated log message, when told to cherry-pick a commit by naming a tag that points at it. It does not anymore. - * "git for-each-ref" learned %(xxxdate:) syntax to show the + * "git for-each-ref" learned %(xxxdate:) syntax to show the various date fields in different formats. * "git gc --auto" is a low-impact way to automatically run a variant of @@ -221,7 +221,7 @@ Updates since v1.5.3 * "git pull --rebase" is a different way to integrate what you fetched into your current branch. - * "git fast-export" produces datastream that can be fed to fast-import + * "git fast-export" produces data-stream that can be fed to fast-import to reproduce the history recorded in a git repository. * "git add -i" takes pathspecs to limit the set of files to work on. @@ -342,7 +342,7 @@ Updates since v1.5.3 * "git help" learned "-w" option to show documentation in browsers. - * In addition there are quite a few internal clean-ups. Notably + * In addition there are quite a few internal clean-ups. Notably: - many fork/exec have been replaced with run-command API, brought from the msysgit effort. @@ -365,7 +365,7 @@ series. * The way "git diff --check" behaves is much more consistent with the way "git apply --whitespace=warn" works. - * "git svn" talking with the SVN over http will correctly quote branch + * "git svn" talking with the SVN over HTTP will correctly quote branch and project names. * "git config" did not work correctly on platforms that define @@ -375,9 +375,3 @@ series. documentation; a workaround has been implemented. * "git diff --color-words" colored context lines in a wrong color. - --- -exec >/var/tmp/1 -O=v1.5.4-rc5 -echo O=`git describe refs/heads/master` -git shortlog --no-merges $O..refs/heads/master ^refs/heads/maint diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index e0842c462c..38a3273974 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.5.4-rc5.GIT +DEF_VER=v1.5.4.GIT LF=' '