From 97afde15f58728138f8e178b2acb7c72473f7d96 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 26 Apr 2012 00:53:59 -0500 Subject: [PATCH 1/7] bundle: remove stray single-quote from error message After running rev-list --boundary to retrieve the list of boundary commits, "git bundle create" runs its own revision walk. If in this stage git encounters an unfamiliar option, it writes a message with an unbalanced quotation mark: error: unrecognized argument: --foo' Drop the stray quote to match the "unrecognized argument: %s" message used elsewhere and save translators some work. This is mostly a futureproofing measure: for now, the "rev-list --boundary" command catches most strange arguments on its own and the above message is not seen unless you try something esoteric like "git bundle create test.bundle --header HEAD". Reported-by: Junio C Hamano Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- bundle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle.c b/bundle.c index 6bf849740c..5364cbfa0f 100644 --- a/bundle.c +++ b/bundle.c @@ -256,7 +256,7 @@ int create_bundle(struct bundle_header *header, const char *path, argc = setup_revisions(argc, argv, &revs, NULL); if (argc > 1) - return error("unrecognized argument: %s'", argv[1]); + return error("unrecognized argument: %s", argv[1]); object_array_remove_duplicates(&revs.pending); From 875b91b35d2517773495e8404f31fde8c5cbd27d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 25 Apr 2012 12:37:38 -0700 Subject: [PATCH 2/7] diff --no-index: use strbuf for temporary pathnames Instead of using limited-length buffers and risking of pathname truncation, we should be taking advantage of strbuf API nowadays. Signed-off-by: Junio C Hamano --- diff-no-index.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/diff-no-index.c b/diff-no-index.c index 5cd3ff5848..b44473e3c1 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -52,7 +52,7 @@ static int get_mode(const char *path, int *mode) } static int queue_diff(struct diff_options *o, - const char *name1, const char *name2) + const char *name1, const char *name2) { int mode1 = 0, mode2 = 0; @@ -63,10 +63,11 @@ static int queue_diff(struct diff_options *o, return error("file/directory conflict: %s, %s", name1, name2); if (S_ISDIR(mode1) || S_ISDIR(mode2)) { - char buffer1[PATH_MAX], buffer2[PATH_MAX]; + struct strbuf buffer1 = STRBUF_INIT; + struct strbuf buffer2 = STRBUF_INIT; struct string_list p1 = STRING_LIST_INIT_DUP; struct string_list p2 = STRING_LIST_INIT_DUP; - int len1 = 0, len2 = 0, i1, i2, ret = 0; + int i1, i2, ret = 0; if (name1 && read_directory(name1, &p1)) return -1; @@ -76,19 +77,15 @@ static int queue_diff(struct diff_options *o, } if (name1) { - len1 = strlen(name1); - if (len1 > 0 && name1[len1 - 1] == '/') - len1--; - memcpy(buffer1, name1, len1); - buffer1[len1++] = '/'; + strbuf_addstr(&buffer1, name1); + if (buffer1.len && buffer1.buf[buffer1.len - 1] != '/') + strbuf_addch(&buffer1, '/'); } if (name2) { - len2 = strlen(name2); - if (len2 > 0 && name2[len2 - 1] == '/') - len2--; - memcpy(buffer2, name2, len2); - buffer2[len2++] = '/'; + strbuf_addstr(&buffer2, name2); + if (buffer2.len && buffer2.buf[buffer2.len - 1] != '/') + strbuf_addch(&buffer2, '/'); } for (i1 = i2 = 0; !ret && (i1 < p1.nr || i2 < p2.nr); ) { @@ -100,31 +97,28 @@ static int queue_diff(struct diff_options *o, else if (i2 == p2.nr) comp = -1; else - comp = strcmp(p1.items[i1].string, - p2.items[i2].string); + comp = strcmp(p1.items[i1].string, p2.items[i2].string); if (comp > 0) n1 = NULL; else { - n1 = buffer1; - strncpy(buffer1 + len1, p1.items[i1++].string, - PATH_MAX - len1); - buffer1[PATH_MAX-1] = 0; + strbuf_addstr(&buffer1, p1.items[i1++].string); + n1 = buffer1.buf; } if (comp < 0) n2 = NULL; else { - n2 = buffer2; - strncpy(buffer2 + len2, p2.items[i2++].string, - PATH_MAX - len2); - buffer2[PATH_MAX-1] = 0; + strbuf_addstr(&buffer2, p2.items[i2++].string); + n2 = buffer2.buf; } ret = queue_diff(o, n1, n2); } string_list_clear(&p1, 0); string_list_clear(&p2, 0); + strbuf_reset(&buffer1); + strbuf_reset(&buffer2); return ret; } else { From 8258858493ad3504630c3bfa7dfde61df811994a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 26 Apr 2012 09:41:52 -0700 Subject: [PATCH 3/7] Git 1.7.7.7 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.7.7.txt | 13 +++++++++++++ Documentation/git.txt | 4 +++- GIT-VERSION-GEN | 2 +- RelNotes | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 Documentation/RelNotes/1.7.7.7.txt diff --git a/Documentation/RelNotes/1.7.7.7.txt b/Documentation/RelNotes/1.7.7.7.txt new file mode 100644 index 0000000000..e79118d063 --- /dev/null +++ b/Documentation/RelNotes/1.7.7.7.txt @@ -0,0 +1,13 @@ +Git v1.7.7.7 Release Notes +========================== + +Fixes since v1.7.7.6 +-------------------- + + * An error message from 'git bundle' had an unmatched single quote pair in it. + + * 'git diff --histogram' option was not described. + + * 'git imap-send' carried an unused dead code. + +Also contains minor fixes and documentation updates. diff --git a/Documentation/git.txt b/Documentation/git.txt index 6803e1309f..9c3e51c4b9 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -44,9 +44,11 @@ unreleased) version of git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v1.7.7.5/git.html[documentation for release 1.7.7.5] +* link:v1.7.7.7/git.html[documentation for release 1.7.7.7] * release notes for + link:RelNotes/1.7.7.7.txt[1.7.7.7], + link:RelNotes/1.7.7.6.txt[1.7.7.6], link:RelNotes/1.7.7.5.txt[1.7.7.5], link:RelNotes/1.7.7.4.txt[1.7.7.4], link:RelNotes/1.7.7.3.txt[1.7.7.3], diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 2feae58821..0b68ab8881 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.7.7.6 +DEF_VER=v1.7.7.7 LF=' ' diff --git a/RelNotes b/RelNotes index 472b95854b..81eb3c2271 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes/1.7.7.6.txt \ No newline at end of file +Documentation/RelNotes/1.7.7.7.txt \ No newline at end of file From d9f5ef7a4a760d58f1f824f9fb8c12ef0371d3a9 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 26 Apr 2012 09:59:22 -0700 Subject: [PATCH 4/7] Git 1.7.8.6 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.8.6.txt | 22 ++++++++++++++++++++++ Documentation/git.txt | 4 +++- GIT-VERSION-GEN | 2 +- RelNotes | 2 +- 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 Documentation/RelNotes/1.7.8.6.txt diff --git a/Documentation/RelNotes/1.7.8.6.txt b/Documentation/RelNotes/1.7.8.6.txt new file mode 100644 index 0000000000..d9bf2b741a --- /dev/null +++ b/Documentation/RelNotes/1.7.8.6.txt @@ -0,0 +1,22 @@ +Git v1.7.8.6 Release Notes +========================== + +Fixes since v1.7.8.5 +-------------------- + + * An error message from 'git bundle' had an unmatched single quote pair in it. + + * 'git diff --histogram' option was not described. + + * Documentation for 'git rev-list' had minor formatting errors. + + * 'git imap-send' carried an unused dead code. + + * The way 'git fetch' implemented its connectivity check over + received objects was overly pessimistic, and wasted a lot of + cycles. + + * Various minor backports of fixes from the 'master' and the 'maint' + branch. + +Also contains minor fixes and documentation updates. diff --git a/Documentation/git.txt b/Documentation/git.txt index e71a0d1d32..16528492df 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -44,9 +44,11 @@ unreleased) version of git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v1.7.8.4/git.html[documentation for release 1.7.8.4] +* link:v1.7.8.6/git.html[documentation for release 1.7.8.6] * release notes for + link:RelNotes/1.7.8.6.txt[1.7.8.6], + link:RelNotes/1.7.8.5.txt[1.7.8.5], link:RelNotes/1.7.8.4.txt[1.7.8.4], link:RelNotes/1.7.8.3.txt[1.7.8.3], link:RelNotes/1.7.8.2.txt[1.7.8.2], diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index c95c200eeb..fe43c5a309 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.7.8.5 +DEF_VER=v1.7.8.6 LF=' ' diff --git a/RelNotes b/RelNotes index dfc0e738d9..b5c2795d47 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes/1.7.8.5.txt \ No newline at end of file +Documentation/RelNotes/1.7.8.6.txt \ No newline at end of file From d0f1ea6003d97e63110fa7d50bb07f546a909b6e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 26 Apr 2012 10:23:15 -0700 Subject: [PATCH 5/7] Git 1.7.9.7 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.9.7.txt | 13 +++++++++++++ Documentation/git.txt | 3 ++- GIT-VERSION-GEN | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 Documentation/RelNotes/1.7.9.7.txt diff --git a/Documentation/RelNotes/1.7.9.7.txt b/Documentation/RelNotes/1.7.9.7.txt new file mode 100644 index 0000000000..59667d0f2a --- /dev/null +++ b/Documentation/RelNotes/1.7.9.7.txt @@ -0,0 +1,13 @@ +Git v1.7.9.7 Release Notes +========================== + +Fixes since v1.7.9.6 +-------------------- + + * An error message from 'git bundle' had an unmatched single quote pair in it. + + * The way 'git fetch' implemented its connectivity check over + received objects was overly pessimistic, and wasted a lot of + cycles. + +Also contains minor fixes and documentation updates. diff --git a/Documentation/git.txt b/Documentation/git.txt index f28a176738..8f3167587d 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v1.7.9.6/git.html[documentation for release 1.7.9.6] +* link:v1.7.9.7/git.html[documentation for release 1.7.9.7] * release notes for + link:RelNotes/1.7.9.7.txt[1.7.9.7], link:RelNotes/1.7.9.6.txt[1.7.9.6], link:RelNotes/1.7.9.5.txt[1.7.9.5], link:RelNotes/1.7.9.4.txt[1.7.9.4], diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index ba8c50302f..5b54635301 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.7.9.6 +DEF_VER=v1.7.9.7 LF=' ' From 868d662399786462f87df45c3d68bd5390311a6e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 26 Apr 2012 10:40:08 -0700 Subject: [PATCH 6/7] Start preparing for 1.7.10.1 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.10.1.txt | 50 +++++++++++++++++++++++++++++ RelNotes | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 Documentation/RelNotes/1.7.10.1.txt diff --git a/Documentation/RelNotes/1.7.10.1.txt b/Documentation/RelNotes/1.7.10.1.txt new file mode 100644 index 0000000000..36b8deef19 --- /dev/null +++ b/Documentation/RelNotes/1.7.10.1.txt @@ -0,0 +1,50 @@ +Git v1.7.10.1 Release Notes +=========================== + +Fixes since v1.7.10 +------------------- + + * "git add -p" is not designed to deal with unmerged paths but did + not exclude them and tried to apply funny patches only to fail. + + * When PATH contains an unreadable directory, alias expansion code + did not kick in, and failed with an error that said "git-subcmd" + was not found. + + * "git clean -d -f" (not "-d -f -f") is supposed to protect nested + working trees of independent git repositories that exist in the + current project working tree from getting removed, but the + protection applied only to such working trees that are at the + top-level of the current project by mistake. + + * "git commit --author=$name" did not tell the name that was being + recorded in the resulting commit to hooks, even though it does do + so when the end user overrode the authorship via the + "GIT_AUTHOR_NAME" environment variable. + + * When "git commit --template F" errors out because the user did not + touch the message, it claimed that it aborts due to "empty + message", which was utterly wrong. + + * The regexp configured with diff.wordregex was incorrectly reused + across files. + + * An age-old corner case bug in combine diff (only triggered with -U0 + and the hunk at the beginning of the file needs to be shown) has + been fixed. + + * Rename detection logic used to match two empty files as renames + during merge-recursive, leading to unnatural mismerges. + + * Running "notes merge --commit" failed to perform correctly when run + from any directory inside $GIT_DIR/. When "notes merge" stops with + conflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits + to resolve it. + + * The 'push to upstream' implementation was broken in some corner + cases. "git push $there" without refspec, when the current branch + is set to push to a remote different from $there, used to push to + $there using the upstream information to a remote unreleated to + $there. + +Also contains minor fixes and documentation updates. diff --git a/RelNotes b/RelNotes index 2c2a169555..46474cc708 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes/1.7.10.txt \ No newline at end of file +Documentation/RelNotes/1.7.10.1.txt \ No newline at end of file From 010b260e6f23b8964ef53b989e1c1baa8973edbe Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 26 Apr 2012 11:02:36 -0700 Subject: [PATCH 7/7] Update draft release notes to 1.7.11 A handful of topics have been merged to maintenance releases, and the first half of 6th batch graduates to 'master'. Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.11.txt | 64 ++++++------------------------- 1 file changed, 11 insertions(+), 53 deletions(-) diff --git a/Documentation/RelNotes/1.7.11.txt b/Documentation/RelNotes/1.7.11.txt index 08a6c31c7f..7ab069aab7 100644 --- a/Documentation/RelNotes/1.7.11.txt +++ b/Documentation/RelNotes/1.7.11.txt @@ -86,6 +86,17 @@ Unless otherwise noted, all the fixes since v1.7.10 in the maintenance releases are contained in this release (see release notes to them for details). + * The i18n of error message "git stash save" was not properly done. + (merge ed3c400 rl/maint-stash-i18n-save-error later to maint). + + * The report from "git fetch" said "new branch" even for a non branch + ref. + (merge 0997ada mb/fetch-call-a-non-branch-a-ref later to maint). + + * The "diff --no-index" codepath used limited-length buffers, risking + pathnames getting truncated. Update it to use the strbuf API. + (merge 875b91b jm/maint-strncpy-diff-no-index later to maint). + * The parser in "fast-import" did not diagnose ":9" style references that is not followed by required SP/LF as an error. (merge 06454cb pw/fast-import-dataref-parsing later to maint). @@ -113,56 +124,3 @@ details). * Giving "--continue" to a conflicted "rebase -i" session skipped a commit that only results in changes to submodules. (merge a6754cd jk/rebase-i-submodule-conflict-only later to maint). - - * When PATH contains an unreadable directory, alias expansion code - did not kick in, and failed with an error that said "git-subcmd" - was not found. - (merge 38f865c jk/run-command-eacces later to maint). - - * The 'push to upstream' implementation was broken in some corner - cases. "git push $there" without refspec, when the current branch - is set to push to a remote different from $there, used to push to - $there using the upstream information to a remote unreleated to - $there. - (merge 135dade jc/push-upstream-sanity later to maint). - - * "git clean -d -f" (not "-d -f -f") is supposed to protect nested - working trees of independent git repositories that exist in the - current project working tree from getting removed, but the - protection applied only to such working trees that are at the - top-level of the current project by mistake. - (merge ae2f203 jc/maint-clean-nested-worktree-in-subdir later to maint). - - * Rename detection logic used to match two empty files as renames - during merge-recursive, leading unnatural mismerges. - (merge 4f7cb99 jk/diff-no-rename-empty later to maint). - - * An age-old corner case bug in combine diff (only triggered with -U0 - and the hunk at the beginning of the file needs to be shown) has - been fixed. - (merge e5e9b56 rs/combine-diff-zero-context-at-the-beginning later to maint). - - * When "git commit --template F" errors out because the user did not - touch the message, it claimed that it aborts due to "empty - message", which was utterly wrong. - (merge 1f08c2c jc/commit-unedited-template later to maint). - - * "git add -p" is not designed to deal with unmerged paths but did - not exclude them and tried to apply funny patches only to fail. - (merge 4066bd6 jk/add-p-skip-conflicts later to maint). - - * "git commit --author=$name" did not tell the name that was being - recorded in the resulting commit to hooks, even though it does do - so when the end user overrode the authorship via the - "GIT_AUTHOR_NAME" environment variable. - (merge 7dfe8ad jc/commit-hook-authorship later to maint). - - * The regexp configured with diff.wordregex was incorrectly reused - across files. - (merge 6440d34 tr/maint-word-diff-regex-sticky later to maint). - - * Running "notes merge --commit" failed to perform correctly when run - from any directory inside $GIT_DIR/. When "notes merge" stops with - conflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits - to resolve it. - (merge dabba59 jh/notes-merge-in-git-dir-worktree later to maint).