From f04833ef9f330612a4116401258882b38e95744e Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Fri, 1 May 2009 20:18:02 -0400 Subject: [PATCH 1/3] honor repack.usedeltabaseoffset when fetching packs If the local receiving repository has disabled the use of delta base offset, for example to retain compatibility with older versions of Git that predate OFS_DELTA, we shouldn't ask for ofs-delta support when we obtain a pack from the remote server. [ issue noticed by Shawn Pearce ] Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- builtin-fetch-pack.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index 67fb80ec48..1effdc0d6b 100644 --- a/builtin-fetch-pack.c +++ b/builtin-fetch-pack.c @@ -13,6 +13,7 @@ static int transfer_unpack_limit = -1; static int fetch_unpack_limit = -1; static int unpack_limit = 100; +static int prefer_ofs_delta = 1; static struct fetch_pack_args args = { /* .uploadpack = */ "git-upload-pack", }; @@ -200,7 +201,7 @@ static int find_common(int fd[2], unsigned char *result_sha1, (args.use_thin_pack ? " thin-pack" : ""), (args.no_progress ? " no-progress" : ""), (args.include_tag ? " include-tag" : ""), - " ofs-delta"); + (prefer_ofs_delta ? " ofs-delta" : "")); else packet_write(fd[1], "want %s\n", sha1_to_hex(remote)); fetching++; @@ -597,6 +598,11 @@ static struct ref *do_fetch_pack(int fd[2], fprintf(stderr, "Server supports side-band\n"); use_sideband = 1; } + if (server_supports("ofs-delta")) { + if (args.verbose) + fprintf(stderr, "Server supports ofs-delta\n"); + } else + prefer_ofs_delta = 0; if (everything_local(&ref, nr_match, match)) { packet_flush(fd[1]); goto all_done; @@ -649,6 +655,11 @@ static int fetch_pack_config(const char *var, const char *value, void *cb) return 0; } + if (strcmp(var, "repack.usedeltabaseoffset") == 0) { + prefer_ofs_delta = git_config_bool(var, value); + return 0; + } + return git_default_config(var, value, cb); } From bab39ed371145b83340750101e7ec85167845857 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 3 May 2009 15:20:03 -0700 Subject: [PATCH 2/3] GIT 1.6.1.4 With a handful of fixes backmerged from 1.6.2.X series Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.1.4.txt | 25 +++++++++++++++++++++++++ GIT-VERSION-GEN | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Documentation/RelNotes-1.6.1.4.txt b/Documentation/RelNotes-1.6.1.4.txt index a9f1a6b8b5..0ce6316d75 100644 --- a/Documentation/RelNotes-1.6.1.4.txt +++ b/Documentation/RelNotes-1.6.1.4.txt @@ -4,15 +4,40 @@ GIT v1.6.1.4 Release Notes Fixes since v1.6.1.3 -------------------- +* .gitignore learned to handle backslash as a quoting mechanism for + comment introduction character "#". + This fix was first merged to 1.6.2.1. + * "git fast-export" produced wrong output with some parents missing from commits, when the history is clock-skewed. * "git fast-import" sometimes failed to read back objects it just wrote out and aborted, because it failed to flush stale cached data. +* "git-ls-tree" and "git-diff-tree" used a pathspec correctly when + deciding to descend into a subdirectory but they did not match the + individual paths correctly. This caused pathspecs "abc/d ab" to match + "abc/0" ("abc/d" made them decide to descend into the directory "abc/", + and then "ab" incorrectly matched "abc/0" when it shouldn't). + This fix was first merged to 1.6.2.3. + +* import-zips script (in contrib) did not compute the common directory + prefix correctly. + This fix was first merged to 1.6.2.2. + +* "git init" segfaulted when given an overlong template location via + the --template= option. + This fix was first merged to 1.6.2.4. + * "git repack" did not error out when necessary object was missing in the repository. +* git-repack (invoked from git-gc) did not work as nicely as it should in + a repository that borrows objects from neighbours via alternates + mechanism especially when some packs are marked with the ".keep" flag + to prevent them from being repacked. + This fix was first merged to 1.6.2.3. + Also includes minor documentation fixes and updates. -- diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 550a0ae371..e5e62ef0de 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.6.1.3.GIT +DEF_VER=v1.6.1.4 LF=' ' From a48f5d7153761fabf0b04fdfd1667adf7eeeddbe Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 3 May 2009 16:14:58 -0700 Subject: [PATCH 3/3] GIT 1.6.2.5 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.2.5.txt | 21 +++++++++++++++++++++ GIT-VERSION-GEN | 2 +- RelNotes | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 Documentation/RelNotes-1.6.2.5.txt diff --git a/Documentation/RelNotes-1.6.2.5.txt b/Documentation/RelNotes-1.6.2.5.txt new file mode 100644 index 0000000000..b23f9e95d1 --- /dev/null +++ b/Documentation/RelNotes-1.6.2.5.txt @@ -0,0 +1,21 @@ +GIT v1.6.2.5 Release Notes +========================== + +Fixes since v1.6.2.4 +-------------------- + +* "git apply" mishandled if you fed a git generated patch that renames + file A to B and file B to A at the same time. + +* "git diff -c -p" (and "diff --cc") did not expect to see submodule + differences and instead refused to work. + +* "git grep -e '('" segfaulted, instead of diagnosing a mismatched + parentheses error. + +* "git fetch" generated packs with offset-delta encoding when both ends of + the connection are capable of producing one; this cannot be read by + ancient git and the user should be able to disable this by setting + repack.usedeltabaseoffset configuration to false. + + diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index c92670bf4c..9d65aed417 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.6.2.4 +DEF_VER=v1.6.2.5 LF=' ' diff --git a/RelNotes b/RelNotes index 22ea275eed..c02134157a 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes-1.6.2.4.txt \ No newline at end of file +Documentation/RelNotes-1.6.2.5.txt \ No newline at end of file