From 1e5f7add985dbccc0e811dbb6eff5047d8843118 Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sat, 2 Aug 2008 03:51:21 +0200 Subject: [PATCH 01/13] builtin-revert.c: typofix Signed-off-by: Stephan Beyer Signed-off-by: Junio C Hamano --- builtin-revert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-revert.c b/builtin-revert.c index 0270f9b85a..bde28b2c4d 100644 --- a/builtin-revert.c +++ b/builtin-revert.c @@ -180,7 +180,7 @@ static void set_author_ident_env(const char *message) email++; timestamp = strchr(email, '>'); if (!timestamp) - die ("Could not extract author email from %s", + die ("Could not extract author time from %s", sha1_to_hex(commit->object.sha1)); *timestamp = '\0'; for (timestamp++; *timestamp && isspace(*timestamp); From d65d2b2fb44a8bc0fc917aaca973ab7ad14d13b4 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 28 Jul 2008 02:02:04 -0400 Subject: [PATCH 02/13] init: handle empty "template" parameter If a user passes "--template=", then our template parameter is blank. Unfortunately, copy_templates() assumes it has at least one character, and does all sorts of bad things like reading from template[-1] and then proceeding to link all of '/' into the .git directory. This patch just checks for that condition in copy_templates and aborts. As a side effect, this means that --template= now has the meaning "don't copy any templates." Signed-off-by: Junio C Hamano --- builtin-init-db.c | 2 ++ t/t0001-init.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/builtin-init-db.c b/builtin-init-db.c index e23b8438c7..c68a3b1e74 100644 --- a/builtin-init-db.c +++ b/builtin-init-db.c @@ -127,6 +127,8 @@ static void copy_templates(const char *template_dir) template_dir = strbuf_detach(&d, NULL); } } + if (!template_dir[0]) + return; strcpy(template_path, template_dir); template_len = strlen(template_path); if (template_path[template_len-1] != '/') { diff --git a/t/t0001-init.sh b/t/t0001-init.sh index d31887f9bf..c0b781ae49 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -141,4 +141,30 @@ test_expect_success 'reinit' ' test_cmp again/empty again/err2 ' +test_expect_success 'init with --template' ' + mkdir template-source && + echo content >template-source/file && + ( + mkdir template-custom && + cd template-custom && + git init --template=../template-source + ) && + test_cmp template-source/file template-custom/.git/file +' + +test_expect_success 'init with --template (blank)' ' + ( + mkdir template-plain && + cd template-plain && + git init + ) && + test -f template-plain/.git/info/exclude && + ( + mkdir template-blank && + cd template-blank && + git init --template= + ) && + ! test -f template-blank/.git/info/exclude +' + test_done From b2a56276512885f0c7d159543395769168c9f599 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 26 Jul 2008 23:15:51 -0700 Subject: [PATCH 03/13] make sure parsed wildcard refspec ends with slash A wildcard refspec is internally parsed into a refspec structure with src and dst strings. Many parts of the code assumed that these do not include the trailing "/*" when matching the wildcard pattern with an actual ref we see at the remote. What this meant was that we needed to make sure not just that the prefix matched, and also that a slash followed the part that matched. But a codepath that scans the result from ls-remote and finds matching refs forgot to check the "matching part must be followed by a slash" rule. This resulted in "refs/heads/b1" from the remote side to mistakenly match the source side of "refs/heads/b/*:refs/remotes/b/*" refspec. Worse, the refspec crafted internally by "git-clone", and a hardcoded preparsed refspec that is used to implement "git-fetch --tags", violated this "parsed widcard refspec does not end with slash" rule; simply adding the "matching part must be followed by a slash" rule then would have broken codepaths that use these refspecs. This commit changes the rule to require a trailing slash to parsed wildcard refspecs. IOW, "refs/heads/b/*:refs/remotes/b/*" is parsed as src = "refs/heads/b/" and dst = "refs/remotes/b/". This allows us to simplify the matching logic because we only need to do a prefixcmp() to notice "refs/heads/b/one" matches and "refs/heads/b1" does not. Acked-by: Daniel Barkalow Signed-off-by: Junio C Hamano --- remote.c | 52 +++++++++++++++++++++++++++--------------- t/t5513-fetch-track.sh | 30 ++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 18 deletions(-) create mode 100755 t/t5513-fetch-track.sh diff --git a/remote.c b/remote.c index ff2c802167..5f687b2e29 100644 --- a/remote.c +++ b/remote.c @@ -424,6 +424,28 @@ static void read_config(void) alias_all_urls(); } +/* + * We need to make sure the tracking branches are well formed, but a + * wildcard refspec in "struct refspec" must have a trailing slash. We + * temporarily drop the trailing '/' while calling check_ref_format(), + * and put it back. The caller knows that a CHECK_REF_FORMAT_ONELEVEL + * error return is Ok for a wildcard refspec. + */ +static int verify_refname(char *name, int is_glob) +{ + int result, len = -1; + + if (is_glob) { + len = strlen(name); + assert(name[len - 1] == '/'); + name[len - 1] = '\0'; + } + result = check_ref_format(name); + if (is_glob) + name[len - 1] = '/'; + return result; +} + static struct refspec *parse_refspec_internal(int nr_refspec, const char **refspec, int fetch, int verify) { int i; @@ -431,11 +453,11 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp struct refspec *rs = xcalloc(sizeof(*rs), nr_refspec); for (i = 0; i < nr_refspec; i++) { - size_t llen, rlen; + size_t llen; int is_glob; const char *lhs, *rhs; - llen = rlen = is_glob = 0; + llen = is_glob = 0; lhs = refspec[i]; if (*lhs == '+') { @@ -455,12 +477,9 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp } if (rhs) { - rhs++; - rlen = strlen(rhs); + size_t rlen = strlen(++rhs); is_glob = (2 <= rlen && !strcmp(rhs + rlen - 2, "/*")); - if (is_glob) - rlen -= 2; - rs[i].dst = xstrndup(rhs, rlen); + rs[i].dst = xstrndup(rhs, rlen - is_glob); } llen = (rhs ? (rhs - lhs - 1) : strlen(lhs)); @@ -468,7 +487,7 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp if ((rhs && !is_glob) || (!rhs && fetch)) goto invalid; is_glob = 1; - llen -= 2; + llen--; } else if (rhs && is_glob) { goto invalid; } @@ -485,7 +504,7 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp if (!*rs[i].src) ; /* empty is ok */ else { - st = check_ref_format(rs[i].src); + st = verify_refname(rs[i].src, is_glob); if (st && st != CHECK_REF_FORMAT_ONELEVEL) goto invalid; } @@ -500,7 +519,7 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp } else if (!*rs[i].dst) { ; /* ok */ } else { - st = check_ref_format(rs[i].dst); + st = verify_refname(rs[i].dst, is_glob); if (st && st != CHECK_REF_FORMAT_ONELEVEL) goto invalid; } @@ -515,7 +534,7 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp if (!*rs[i].src) ; /* empty is ok */ else if (is_glob) { - st = check_ref_format(rs[i].src); + st = verify_refname(rs[i].src, is_glob); if (st && st != CHECK_REF_FORMAT_ONELEVEL) goto invalid; } @@ -529,13 +548,13 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp * - otherwise it must be a valid looking ref. */ if (!rs[i].dst) { - st = check_ref_format(rs[i].src); + st = verify_refname(rs[i].src, is_glob); if (st && st != CHECK_REF_FORMAT_ONELEVEL) goto invalid; } else if (!*rs[i].dst) { goto invalid; } else { - st = check_ref_format(rs[i].dst); + st = verify_refname(rs[i].dst, is_glob); if (st && st != CHECK_REF_FORMAT_ONELEVEL) goto invalid; } @@ -684,8 +703,7 @@ int remote_find_tracking(struct remote *remote, struct refspec *refspec) if (!fetch->dst) continue; if (fetch->pattern) { - if (!prefixcmp(needle, key) && - needle[strlen(key)] == '/') { + if (!prefixcmp(needle, key)) { *result = xmalloc(strlen(value) + strlen(needle) - strlen(key) + 1); @@ -963,9 +981,7 @@ static const struct refspec *check_pattern_match(const struct refspec *rs, continue; } - if (rs[i].pattern && - !prefixcmp(src->name, rs[i].src) && - src->name[strlen(rs[i].src)] == '/') + if (rs[i].pattern && !prefixcmp(src->name, rs[i].src)) return rs + i; } if (matching_refs != -1) diff --git a/t/t5513-fetch-track.sh b/t/t5513-fetch-track.sh new file mode 100755 index 0000000000..9e7486274b --- /dev/null +++ b/t/t5513-fetch-track.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +test_description='fetch follows remote tracking branches correctly' + +. ./test-lib.sh + +test_expect_success setup ' + >file && + git add . && + test_tick && + git commit -m Initial && + git branch b-0 && + git branch b1 && + git branch b/one && + test_create_repo other && + ( + cd other && + git config remote.origin.url .. && + git config remote.origin.fetch "+refs/heads/b/*:refs/remotes/b/*" + ) +' + +test_expect_success fetch ' + ( + cd other && git fetch origin && + test "$(git for-each-ref --format="%(refname)")" = refs/remotes/b/one + ) +' + +test_done From bbff8aaaf2f2342b97882f93c9e30050918621c0 Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Sun, 27 Jul 2008 13:12:15 +0200 Subject: [PATCH 04/13] Documentation: fix diff.external example The diff.external examples pass a flag to gnu-diff, but GNU diff does not follow the GIT_EXTERNAL_DIFF interface. Signed-off-by: Anders Melchiorsen Signed-off-by: Junio C Hamano --- Documentation/config.txt | 10 ++++++---- Documentation/git-config.txt | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 5331b450ea..d4ca8b2712 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -92,7 +92,7 @@ Example # Our diff algorithm [diff] - external = "/usr/local/bin/gnu-diff -u" + external = /usr/local/bin/diff-wrapper renames = true [branch "devel"] @@ -554,9 +554,11 @@ diff.autorefreshindex:: diff.external:: If this config variable is set, diff generation is not performed using the internal diff machinery, but using the - given command. Note: if you want to use an external diff - program only on a subset of your files, you might want to - use linkgit:gitattributes[5] instead. + given command. Can be overridden with the `GIT_EXTERNAL_DIFF' + environment variable. The command is called with parameters + as described under "git Diffs" in linkgit:git[1]. Note: if + you want to use an external diff program only on a subset of + your files, you might want to use linkgit:gitattributes[5] instead. diff.renameLimit:: The number of files to consider when performing the copy/rename diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index c90421ee7f..b0f20e2392 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -231,7 +231,7 @@ Given a .git/config like this: ; Our diff algorithm [diff] - external = "/usr/local/bin/gnu-diff -u" + external = /usr/local/bin/diff-wrapper renames = true ; Proxy settings From 31f4e768a4b53419a1de9c4006c7b3747fc356eb Mon Sep 17 00:00:00 2001 From: Steve Haslam Date: Fri, 25 Jul 2008 18:51:51 +0100 Subject: [PATCH 05/13] Propagate -u/--upload-pack option of "git clone" to transport. The -u option to override the remote system's path to git-upload-pack was being ignored by "git clone"; caused by a missing call to transport_set_option to set TRANS_OPT_UPLOADPACK. Presumably this crept in when git-clone was converted from shell to C. Signed-off-by: Steve Haslam Signed-off-by: Junio C Hamano --- builtin-clone.c | 4 ++++ t/t5602-clone-remote-exec.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 t/t5602-clone-remote-exec.sh diff --git a/builtin-clone.c b/builtin-clone.c index 7ee8275269..863b22eeb2 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -473,6 +473,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix) if (option_quiet) transport->verbose = -1; + if (option_upload_pack) + transport_set_option(transport, TRANS_OPT_UPLOADPACK, + option_upload_pack); + refs = transport_get_remote_refs(transport); transport_fetch_refs(transport, refs); } diff --git a/t/t5602-clone-remote-exec.sh b/t/t5602-clone-remote-exec.sh new file mode 100755 index 0000000000..8367a6845f --- /dev/null +++ b/t/t5602-clone-remote-exec.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +test_description=clone + +. ./test-lib.sh + +test_expect_success setup ' + echo "#!/bin/sh" > not_ssh + echo "echo \"\$*\" > not_ssh_output" >> not_ssh + echo "exit 1" >> not_ssh + chmod +x not_ssh +' + +test_expect_success 'clone calls git-upload-pack unqualified with no -u option' ' + GIT_SSH=./not_ssh git clone localhost:/path/to/repo junk + echo "localhost git-upload-pack '\''/path/to/repo'\''" >expected + test_cmp expected not_ssh_output +' + +test_expect_success 'clone calls specified git-upload-pack with -u option' ' + GIT_SSH=./not_ssh git clone -u /something/bin/git-upload-pack localhost:/path/to/repo junk + echo "localhost /something/bin/git-upload-pack '\''/path/to/repo'\''" >expected + test_cmp expected not_ssh_output +' + +test_done From b1264da8637dc991b84e329c2c4958c1332d069f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 23 Jul 2008 16:16:05 -0700 Subject: [PATCH 06/13] Documentation: clarify diff --cc The definition of an "uninteresting" hunk was not in line with reality. Signed-off-by: Junio C Hamano --- Documentation/git-diff-tree.txt | 10 +++++----- Documentation/rev-list-options.txt | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt index 56caeb2d26..f4fbec48d8 100644 --- a/Documentation/git-diff-tree.txt +++ b/Documentation/git-diff-tree.txt @@ -93,11 +93,11 @@ include::pretty-options.txt[] This flag changes the way a merge commit patch is displayed, in a similar way to the '-c' option. It implies the '-c' and '-p' options and further compresses the patch output - by omitting hunks that show differences from only one - parent, or show the same change from all but one parent - for an Octopus merge. When this optimization makes all - hunks disappear, the commit itself and the commit log - message is not shown, just like in any other "empty diff" case. + by omitting uninteresting hunks whose the contents in the parents + have only two variants and the merge result picks one of them + without modification. When all hunks are uninteresting, the commit + itself and the commit log message is not shown, just like in any other + "empty diff" case. --always:: Show the commit itself and the commit log message even diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 37dd1d61ea..f69260f4c0 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -108,9 +108,9 @@ options may be given. See linkgit:git-diff-files[1] for more options. --cc:: This flag implies the '-c' options and further compresses the - patch output by omitting hunks that show differences from only - one parent, or show the same change from all but one parent for - an Octopus merge. + patch output by omitting uninteresting hunks whose contents in + the parents have only two variants and the merge result picks + one of them without modification. -r:: From 11ee57bc4c44763b7ea92c5f583e27a5fbbff76b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 23 Jul 2008 01:51:36 +0100 Subject: [PATCH 07/13] sort_in_topological_order(): avoid setting a commit flag We used to set the TOPOSORT flag of commits during the topological sorting, but we can just as well use the member "indegree" for it: indegree is now incremented by 1 in the cases where the commit used to have the TOPOSORT flag. This is the same behavior as before, since indegree could not be non-zero when TOPOSORT was unset. Incidentally, this fixes the bug in show-branch where the 8th column was not shown: show-branch sorts the commits in topological order, assuming that all the commit flags are available for show-branch's private matters. But this was not true: TOPOSORT was identical to the flag corresponding to the 8th ref. So the flags for the 8th column were unset by the topological sorting. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- commit.c | 13 ++++---- revision.h | 1 - t/t3202-show-branch-octopus.sh | 59 ++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 8 deletions(-) create mode 100755 t/t3202-show-branch-octopus.sh diff --git a/commit.c b/commit.c index e2d8624d9c..09cf167423 100644 --- a/commit.c +++ b/commit.c @@ -428,8 +428,7 @@ void sort_in_topological_order(struct commit_list ** list, int lifo) /* Mark them and clear the indegree */ for (next = orig; next; next = next->next) { struct commit *commit = next->item; - commit->object.flags |= TOPOSORT; - commit->indegree = 0; + commit->indegree = 1; } /* update the indegree */ @@ -438,7 +437,7 @@ void sort_in_topological_order(struct commit_list ** list, int lifo) while (parents) { struct commit *parent = parents->item; - if (parent->object.flags & TOPOSORT) + if (parent->indegree) parent->indegree++; parents = parents->next; } @@ -456,7 +455,7 @@ void sort_in_topological_order(struct commit_list ** list, int lifo) for (next = orig; next; next = next->next) { struct commit *commit = next->item; - if (!commit->indegree) + if (commit->indegree == 1) insert = &commit_list_insert(commit, insert)->next; } @@ -478,7 +477,7 @@ void sort_in_topological_order(struct commit_list ** list, int lifo) for (parents = commit->parents; parents ; parents = parents->next) { struct commit *parent=parents->item; - if (!(parent->object.flags & TOPOSORT)) + if (!parent->indegree) continue; /* @@ -486,7 +485,7 @@ void sort_in_topological_order(struct commit_list ** list, int lifo) * when all their children have been emitted thereby * guaranteeing topological order. */ - if (!--parent->indegree) { + if (--parent->indegree == 1) { if (!lifo) insert_by_date(parent, &work); else @@ -497,7 +496,7 @@ void sort_in_topological_order(struct commit_list ** list, int lifo) * work_item is a commit all of whose children * have already been emitted. we can emit it now. */ - commit->object.flags &= ~TOPOSORT; + commit->indegree = 0; *pptr = work_item; pptr = &work_item->next; } diff --git a/revision.h b/revision.h index abce5001f1..31f08c4056 100644 --- a/revision.h +++ b/revision.h @@ -10,7 +10,6 @@ #define CHILD_SHOWN (1u<<6) #define ADDED (1u<<7) /* Parents already parsed and added? */ #define SYMMETRIC_LEFT (1u<<8) -#define TOPOSORT (1u<<9) /* In the active toposort list.. */ struct rev_info; struct log_info; diff --git a/t/t3202-show-branch-octopus.sh b/t/t3202-show-branch-octopus.sh new file mode 100755 index 0000000000..7fe4a6ecb0 --- /dev/null +++ b/t/t3202-show-branch-octopus.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +test_description='test show-branch with more than 8 heads' + +. ./test-lib.sh + +numbers="1 2 3 4 5 6 7 8 9 10" + +test_expect_success 'setup' ' + + > file && + git add file && + test_tick && + git commit -m initial && + + for i in $numbers + do + git checkout -b branch$i master && + > file$i && + git add file$i && + test_tick && + git commit -m branch$i || break + done + +' + +cat > expect << EOF +! [branch1] branch1 + ! [branch2] branch2 + ! [branch3] branch3 + ! [branch4] branch4 + ! [branch5] branch5 + ! [branch6] branch6 + ! [branch7] branch7 + ! [branch8] branch8 + ! [branch9] branch9 + * [branch10] branch10 +---------- + * [branch10] branch10 + + [branch9] branch9 + + [branch8] branch8 + + [branch7] branch7 + + [branch6] branch6 + + [branch5] branch5 + + [branch4] branch4 + + [branch3] branch3 + + [branch2] branch2 ++ [branch1] branch1 ++++++++++* [branch10^] initial +EOF + +test_expect_success 'show-branch with more than 8 branches' ' + + git show-branch $(for i in $numbers; do echo branch$i; done) > out && + test_cmp expect out + +' + +test_done From 734a6ffafb754323a4cde51b61a6099b46d03466 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Tue, 22 Jul 2008 16:23:31 -0500 Subject: [PATCH 08/13] t/t4202-log.sh: add newline at end of file Some shells hang when parsing the script if the last statement is not followed by a newline. So add one. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t4202-log.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t4202-log.sh b/t/t4202-log.sh index b53645417b..4c8af45f83 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -71,4 +71,5 @@ test_expect_success 'diff-filter=D' ' -test_done \ No newline at end of file +test_done + From 00332b8152c541fcb8887019bb04dd425739d038 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Mon, 21 Jul 2008 20:15:59 +0200 Subject: [PATCH 09/13] git-submodule: move ill placed shift. When running git submodule update -i, the "-i" is shifted before recursing into cmd_init and then again outside of the loop. This causes some /bin/sh to complain about shifting when there are no arguments left (and would discard anything written after -i too). Signed-off-by: Pierre Habouzit Signed-off-by: Junio C Hamano --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index 099a7d7560..21e5b5b7da 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -269,6 +269,7 @@ cmd_update() do case "$1" in -q|--quiet) + shift quiet=1 ;; -i|--init) @@ -286,7 +287,6 @@ cmd_update() break ;; esac - shift done git ls-files --stage -- "$@" | grep '^160000 ' | From 61d47feec61c0f7a6cb192bd40f17d45f6bc0560 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 21 Jul 2008 13:34:06 -0500 Subject: [PATCH 10/13] git-diff(1): "--c" -> "--cc" typo fix git diff does not take a --c option. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/diff-generate-patch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt index 029c5f2b82..517e1eba3c 100644 --- a/Documentation/diff-generate-patch.txt +++ b/Documentation/diff-generate-patch.txt @@ -96,7 +96,7 @@ index fabadb8,cc95eb0..4866510 + or like this (when '--cc' option is used): - diff --c file + diff --cc file 2. It is followed by one or more extended header lines (this example shows a merge with two parents): From 1ceb95c8041cad1c25c73fd08e8c0c7ee28cf704 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 21 Jul 2008 12:14:42 -0700 Subject: [PATCH 11/13] Update my e-mail address The old cox.net address is still getting mails from gitters. Signed-off-by: Junio C Hamano --- Documentation/git-am.txt | 2 +- Documentation/git-blame.txt | 2 +- Documentation/git-branch.txt | 2 +- Documentation/git-check-attr.txt | 2 +- Documentation/git-cherry-pick.txt | 2 +- Documentation/git-cherry.txt | 2 +- Documentation/git-commit.txt | 2 +- Documentation/git-count-objects.txt | 2 +- Documentation/git-describe.txt | 2 +- Documentation/git-fetch.txt | 2 +- Documentation/git-fmt-merge-msg.txt | 2 +- Documentation/git-format-patch.txt | 2 +- Documentation/git-hash-object.txt | 2 +- Documentation/git-ls-remote.txt | 2 +- Documentation/git-ls-tree.txt | 2 +- Documentation/git-mailinfo.txt | 2 +- Documentation/git-mailsplit.txt | 2 +- Documentation/git-merge-one-file.txt | 2 +- Documentation/git-merge.txt | 2 +- Documentation/git-mktree.txt | 2 +- Documentation/git-peek-remote.txt | 2 +- Documentation/git-pull.txt | 2 +- Documentation/git-push.txt | 2 +- Documentation/git-rebase.txt | 2 +- Documentation/git-reflog.txt | 2 +- Documentation/git-request-pull.txt | 2 +- Documentation/git-rerere.txt | 2 +- Documentation/git-reset.txt | 2 +- Documentation/git-rev-parse.txt | 2 +- Documentation/git-revert.txt | 2 +- Documentation/git-show-branch.txt | 2 +- Documentation/git-show.txt | 2 +- Documentation/git-status.txt | 2 +- Documentation/git-symbolic-ref.txt | 2 +- Documentation/git-tag.txt | 2 +- Documentation/git-update-server-info.txt | 2 +- Documentation/git-verify-pack.txt | 2 +- Documentation/git-whatchanged.txt | 2 +- Documentation/howto/rebase-from-internal-branch.txt | 2 +- Documentation/howto/rebuild-from-update-hook.txt | 2 +- Documentation/howto/revert-branch-rebase.txt | 2 +- Documentation/howto/separating-topic-branches.txt | 2 +- Documentation/howto/update-hook-example.txt | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 46544a0769..5622971f6a 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -153,7 +153,7 @@ linkgit:git-apply[1]. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt index 8f4fb46685..0e0196e5b0 100644 --- a/Documentation/git-blame.txt +++ b/Documentation/git-blame.txt @@ -190,7 +190,7 @@ linkgit:git-annotate[1] AUTHOR ------ -Written by Junio C Hamano +Written by Junio C Hamano GIT --- diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 0fd58083eb..39cd5d961f 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -202,7 +202,7 @@ but different purposes: Author ------ -Written by Linus Torvalds and Junio C Hamano +Written by Linus Torvalds and Junio C Hamano Documentation -------------- diff --git a/Documentation/git-check-attr.txt b/Documentation/git-check-attr.txt index ef16b93982..f8e1bd5027 100644 --- a/Documentation/git-check-attr.txt +++ b/Documentation/git-check-attr.txt @@ -30,7 +30,7 @@ linkgit:gitattributes[5]. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 4ef5af4ca9..44e7749b10 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -74,7 +74,7 @@ effect to your index in a row. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt index ef7caf61e1..912601160c 100644 --- a/Documentation/git-cherry.txt +++ b/Documentation/git-cherry.txt @@ -64,7 +64,7 @@ linkgit:git-patch-id[1] Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 7e8b4ff72c..861ce93a49 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -322,7 +322,7 @@ linkgit:git-commit-tree[1] Author ------ Written by Linus Torvalds and -Junio C Hamano +Junio C Hamano GIT diff --git a/Documentation/git-count-objects.txt b/Documentation/git-count-objects.txt index 1ba85a259a..4a9dcd7382 100644 --- a/Documentation/git-count-objects.txt +++ b/Documentation/git-count-objects.txt @@ -27,7 +27,7 @@ OPTIONS Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index 9f6f483186..44aaa4090c 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -136,7 +136,7 @@ will be the smallest number of commits possible. Author ------ Written by Linus Torvalds , but somewhat -butchered by Junio C Hamano . Later significantly +butchered by Junio C Hamano . Later significantly updated by Shawn Pearce . Documentation diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt index 489b2b17e6..4fae7fb5a8 100644 --- a/Documentation/git-fetch.txt +++ b/Documentation/git-fetch.txt @@ -45,7 +45,7 @@ linkgit:git-pull[1] Author ------ Written by Linus Torvalds and -Junio C Hamano +Junio C Hamano Documentation ------------- diff --git a/Documentation/git-fmt-merge-msg.txt b/Documentation/git-fmt-merge-msg.txt index 2a7cfb980b..222052fba7 100644 --- a/Documentation/git-fmt-merge-msg.txt +++ b/Documentation/git-fmt-merge-msg.txt @@ -61,7 +61,7 @@ linkgit:git-merge[1] Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 4dafa39a92..ee27eff3b1 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -235,7 +235,7 @@ linkgit:git-am[1], linkgit:git-send-email[1] Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt index cf3dce8a4a..1abcd96c6d 100644 --- a/Documentation/git-hash-object.txt +++ b/Documentation/git-hash-object.txt @@ -37,7 +37,7 @@ OPTIONS Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt index f92f3ca186..f282164e9b 100644 --- a/Documentation/git-ls-remote.txt +++ b/Documentation/git-ls-remote.txt @@ -69,7 +69,7 @@ EXAMPLES Author ------ -Written by Junio C Hamano +Written by Junio C Hamano GIT --- diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt index d9881fbbbe..8955b71302 100644 --- a/Documentation/git-ls-tree.txt +++ b/Documentation/git-ls-tree.txt @@ -81,7 +81,7 @@ with minimum width of 7 characters. Object size is given only for blobs Author ------ Written by Petr Baudis -Completely rewritten from scratch by Junio C Hamano , +Completely rewritten from scratch by Junio C Hamano , another major rewrite by Linus Torvalds Documentation diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt index 1e126f4a5c..0b23faee7a 100644 --- a/Documentation/git-mailinfo.txt +++ b/Documentation/git-mailinfo.txt @@ -60,7 +60,7 @@ conversion, even with this flag. Author ------ Written by Linus Torvalds and -Junio C Hamano +Junio C Hamano Documentation diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt index 9a2aedd480..1a0df38d5b 100644 --- a/Documentation/git-mailsplit.txt +++ b/Documentation/git-mailsplit.txt @@ -46,7 +46,7 @@ OPTIONS Author ------ Written by Linus Torvalds -and Junio C Hamano +and Junio C Hamano Documentation diff --git a/Documentation/git-merge-one-file.txt b/Documentation/git-merge-one-file.txt index 5c9ce641ec..546ebe8bf0 100644 --- a/Documentation/git-merge-one-file.txt +++ b/Documentation/git-merge-one-file.txt @@ -18,7 +18,7 @@ to resolve a merge after the trivial merge done with "git-read-tree -m". Author ------ Written by Linus Torvalds , -Junio C Hamano and Petr Baudis . +Junio C Hamano and Petr Baudis . Documentation -------------- diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 55bc367479..b05e0cee11 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -159,7 +159,7 @@ linkgit:gitattributes[5] Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation diff --git a/Documentation/git-mktree.txt b/Documentation/git-mktree.txt index 1ddbf00afc..6927eb9950 100644 --- a/Documentation/git-mktree.txt +++ b/Documentation/git-mktree.txt @@ -23,7 +23,7 @@ OPTIONS Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-peek-remote.txt b/Documentation/git-peek-remote.txt index ffbf93a799..3fb17f9d7f 100644 --- a/Documentation/git-peek-remote.txt +++ b/Documentation/git-peek-remote.txt @@ -39,7 +39,7 @@ OPTIONS Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index d0f1595f7e..c731bdc07e 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -194,7 +194,7 @@ linkgit:git-fetch[1], linkgit:git-merge[1], linkgit:git-config[1] Author ------ Written by Linus Torvalds -and Junio C Hamano +and Junio C Hamano Documentation -------------- diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 89e0049bce..82dd4433f2 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -194,7 +194,7 @@ git push origin master:refs/heads/experimental:: Author ------ -Written by Junio C Hamano , later rewritten in C +Written by Junio C Hamano , later rewritten in C by Linus Torvalds Documentation diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 7166414355..b7e1da000c 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -397,7 +397,7 @@ after each commit, test, and amend the commit if fixes are necessary. Authors ------ -Written by Junio C Hamano and +Written by Junio C Hamano and Johannes E. Schindelin Documentation diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt index 8492aeacf1..c9c25f3337 100644 --- a/Documentation/git-reflog.txt +++ b/Documentation/git-reflog.txt @@ -94,7 +94,7 @@ them. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-request-pull.txt b/Documentation/git-request-pull.txt index c71d86985e..70810c01d4 100644 --- a/Documentation/git-request-pull.txt +++ b/Documentation/git-request-pull.txt @@ -28,7 +28,7 @@ OPTIONS Author ------ -Written by Ryan Anderson and Junio C Hamano +Written by Ryan Anderson and Junio C Hamano Documentation -------------- diff --git a/Documentation/git-rerere.txt b/Documentation/git-rerere.txt index 8030ec4d01..37828e5c5a 100644 --- a/Documentation/git-rerere.txt +++ b/Documentation/git-rerere.txt @@ -204,7 +204,7 @@ conflict. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano GIT --- diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 12ea9b23c5..0b368b39ee 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -195,7 +195,7 @@ $ git add frotz.c <3> Author ------ -Written by Junio C Hamano and Linus Torvalds +Written by Junio C Hamano and Linus Torvalds Documentation -------------- diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index ba65bfa16b..9082fc991b 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -416,7 +416,7 @@ but if $REV is empty, the commit object name from master will be printed. Author ------ Written by Linus Torvalds . -Junio C Hamano and Pierre Habouzit +Junio C Hamano and Pierre Habouzit Documentation -------------- diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index f7f4bd4689..5fdeaff994 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -61,7 +61,7 @@ effect to your index in a row. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt index de9e8f885f..6f4a2c4306 100644 --- a/Documentation/git-show-branch.txt +++ b/Documentation/git-show-branch.txt @@ -182,7 +182,7 @@ topologically related with each other. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt index baaf2bc8fe..1017391f7c 100644 --- a/Documentation/git-show.txt +++ b/Documentation/git-show.txt @@ -71,7 +71,7 @@ include::i18n.txt[] Author ------ Written by Linus Torvalds and -Junio C Hamano . Significantly enhanced by +Junio C Hamano . Significantly enhanced by Johannes Schindelin . diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt index fef62b16df..6026e8b84b 100644 --- a/Documentation/git-status.txt +++ b/Documentation/git-status.txt @@ -64,7 +64,7 @@ linkgit:gitignore[5] Author ------ Written by Linus Torvalds and -Junio C Hamano . +Junio C Hamano . Documentation -------------- diff --git a/Documentation/git-symbolic-ref.txt b/Documentation/git-symbolic-ref.txt index 3d3a059c5e..5709dee208 100644 --- a/Documentation/git-symbolic-ref.txt +++ b/Documentation/git-symbolic-ref.txt @@ -55,7 +55,7 @@ name is not a symbolic ref, or 128 if another error occurs. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano GIT --- diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 8f40f4bf0d..6cf11ce648 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -247,7 +247,7 @@ $ GIT_COMMITTER_DATE="2006-10-02 10:31" git tag -s v1.0.1 Author ------ Written by Linus Torvalds , -Junio C Hamano and Chris Wright . +Junio C Hamano and Chris Wright . Documentation -------------- diff --git a/Documentation/git-update-server-info.txt b/Documentation/git-update-server-info.txt index d21be41d06..4fd7b5edf9 100644 --- a/Documentation/git-update-server-info.txt +++ b/Documentation/git-update-server-info.txt @@ -47,7 +47,7 @@ info/refs file unless `--force` flag is given. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-verify-pack.txt b/Documentation/git-verify-pack.txt index 478f236996..ff704bd93f 100644 --- a/Documentation/git-verify-pack.txt +++ b/Documentation/git-verify-pack.txt @@ -42,7 +42,7 @@ for objects that are deltified. Author ------ -Written by Junio C Hamano +Written by Junio C Hamano Documentation -------------- diff --git a/Documentation/git-whatchanged.txt b/Documentation/git-whatchanged.txt index f5d39c7870..fb672ea0fc 100644 --- a/Documentation/git-whatchanged.txt +++ b/Documentation/git-whatchanged.txt @@ -67,7 +67,7 @@ git-whatchanged --since="2 weeks ago" \-- gitk:: Author ------ Written by Linus Torvalds and -Junio C Hamano +Junio C Hamano Documentation diff --git a/Documentation/howto/rebase-from-internal-branch.txt b/Documentation/howto/rebase-from-internal-branch.txt index 7a76045eb7..d214d4bf9d 100644 --- a/Documentation/howto/rebase-from-internal-branch.txt +++ b/Documentation/howto/rebase-from-internal-branch.txt @@ -1,4 +1,4 @@ -From: Junio C Hamano +From: Junio C Hamano To: git@vger.kernel.org Cc: Petr Baudis , Linus Torvalds Subject: Re: sending changesets from the middle of a git tree diff --git a/Documentation/howto/rebuild-from-update-hook.txt b/Documentation/howto/rebuild-from-update-hook.txt index 8d55dfbfae..48c67568d3 100644 --- a/Documentation/howto/rebuild-from-update-hook.txt +++ b/Documentation/howto/rebuild-from-update-hook.txt @@ -1,6 +1,6 @@ Subject: [HOWTO] Using post-update hook Message-ID: <7vy86o6usx.fsf@assigned-by-dhcp.cox.net> -From: Junio C Hamano +From: Junio C Hamano Date: Fri, 26 Aug 2005 18:19:10 -0700 Abstract: In this how-to article, JC talks about how he uses the post-update hook to automate git documentation page diff --git a/Documentation/howto/revert-branch-rebase.txt b/Documentation/howto/revert-branch-rebase.txt index 865a666324..e70d8a31e7 100644 --- a/Documentation/howto/revert-branch-rebase.txt +++ b/Documentation/howto/revert-branch-rebase.txt @@ -1,4 +1,4 @@ -From: Junio C Hamano +From: Junio C Hamano To: git@vger.kernel.org Subject: [HOWTO] Reverting an existing commit Abstract: In this article, JC gives a small real-life example of using diff --git a/Documentation/howto/separating-topic-branches.txt b/Documentation/howto/separating-topic-branches.txt index 0d73b31224..6d3eb8ed00 100644 --- a/Documentation/howto/separating-topic-branches.txt +++ b/Documentation/howto/separating-topic-branches.txt @@ -1,4 +1,4 @@ -From: Junio C Hamano +From: Junio C Hamano Subject: Separating topic branches Abstract: In this article, JC describes how to separate topic branches. diff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt index a8d3bae408..3ef7c0d908 100644 --- a/Documentation/howto/update-hook-example.txt +++ b/Documentation/howto/update-hook-example.txt @@ -1,4 +1,4 @@ -From: Junio C Hamano and Carl Baldwin +From: Junio C Hamano and Carl Baldwin Subject: control access to branches. Date: Thu, 17 Nov 2005 23:55:32 -0800 Message-ID: <7vfypumlu3.fsf@assigned-by-dhcp.cox.net> From 69c231f4732e1373f7872dde6dc50ffe62673865 Mon Sep 17 00:00:00 2001 From: Ciaran McCreesh Date: Mon, 14 Jul 2008 19:29:37 +0100 Subject: [PATCH 12/13] Make git-add -i accept ranges like 7- git-add -i ranges expect number-number. But for the supremely lazy, typing in that second number when selecting "from patch 7 to the end" is wasted effort. So treat an empty second number in a range as "until the last item". Signed-off-by: Ciaran McCreesh Signed-off-by: Junio C Hamano --- Documentation/git-add.txt | 5 +++-- git-add--interactive.perl | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index b8e3fa6759..815864c37f 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -187,8 +187,9 @@ update:: "Update>>". When the prompt ends with double '>>', you can make more than one selection, concatenated with whitespace or comma. Also you can say ranges. E.g. "2-5 7,9" to choose - 2,3,4,5,7,9 from the list. You can say '*' to choose - everything. + 2,3,4,5,7,9 from the list. If the second number in a range is + omitted, all remaining patches are taken. E.g. "7-" to choose + 7,8,9 from the list. You can say '*' to choose everything. + What you chose are then highlighted with '*', like this: diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 903953e68e..709caa9055 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -394,9 +394,9 @@ sub list_and_choose { if ($choice =~ s/^-//) { $choose = 0; } - # A range can be specified like 5-7 - if ($choice =~ /^(\d+)-(\d+)$/) { - ($bottom, $top) = ($1, $2); + # A range can be specified like 5-7 or 5-. + if ($choice =~ /^(\d+)-(\d*)$/) { + ($bottom, $top) = ($1, length($2) ? $2 : 1 + @stuff); } elsif ($choice =~ /^\d+$/) { $bottom = $top = $choice; From e12455479651c3444aca9cf550b1e1beed1055a6 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 1 Aug 2008 23:54:01 -0700 Subject: [PATCH 13/13] Start 1.5.6.5 RelNotes to describe accumulated fixes Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.6.5.txt | 19 +++++++++++++++++++ RelNotes | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 Documentation/RelNotes-1.5.6.5.txt diff --git a/Documentation/RelNotes-1.5.6.5.txt b/Documentation/RelNotes-1.5.6.5.txt new file mode 100644 index 0000000000..fc40438b16 --- /dev/null +++ b/Documentation/RelNotes-1.5.6.5.txt @@ -0,0 +1,19 @@ +GIT v1.5.6.5 Release Notes +========================== + +Fixes since v1.5.6.4 +-------------------- + +* "git init --template=" with blank "template" parameter linked files + under root directories to .git, which was a total nonsense. Instead, it + means "I do not want to use anything from the template directory". + +* "git show-branch" mishandled its 8th branch. + +* Addition of "git update-index --ignore-submodules" that happened during + 1.5.6 cycle broke "git update-index --ignore-missing". + +* "git send-email" did not parse charset from an existing Content-type: + header properly. + +Contains other various documentation fixes. diff --git a/RelNotes b/RelNotes index e4bd68a0db..1c0163594a 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes-1.5.6.4.txt \ No newline at end of file +Documentation/RelNotes-1.5.6.5.txt \ No newline at end of file