From 0cc4da303641611e8d9cc431e7b4d3f1a6a0dc86 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Tue, 6 Jul 2010 18:34:20 -0500 Subject: [PATCH 1/5] t/t0006: specify timezone as EST5 not EST to comply with POSIX POSIX requires that both the timezone "standard" and "offset" be specified in the TZ environment variable. This causes a problem on IRIX which does not understand the timezone 'EST'. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t0006-date.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t0006-date.sh b/t/t0006-date.sh index b2df4fe102..1d4d0a5c7d 100755 --- a/t/t0006-date.sh +++ b/t/t0006-date.sh @@ -39,7 +39,7 @@ check_parse 2008-02 bad check_parse 2008-02-14 bad check_parse '2008-02-14 20:30:45' '2008-02-14 20:30:45 +0000' check_parse '2008-02-14 20:30:45 -0500' '2008-02-14 20:30:45 -0500' -check_parse '2008-02-14 20:30:45' '2008-02-14 20:30:45 -0500' EST +check_parse '2008-02-14 20:30:45' '2008-02-14 20:30:45 -0500' EST5 check_approxidate() { echo "$1 -> $2 +0000" >expect From 765c22588d9e410bf0100c4991b1945134da6959 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Wed, 7 Jul 2010 09:47:20 +0200 Subject: [PATCH 2/5] fix git branch -m in presence of cross devices When you have for example a bare repository stored on NFS, and that you create new workdirs locally (using contrib's git-new-workdir), logs/refs is a symlink to a different device. Hence when the reflogs are renamed, all must happen below logs/refs or one gets cross device rename errors like: git branch -m foo error: unable to move logfile logs/refs/heads/master to tmp-renamed-log: Invalid cross-device link fatal: Branch rename failed The fix is hence to use logs/refs/.tmp-renamed-log as a temporary log name, instead of just tmp-renamed-log. Signed-off-by: Pierre Habouzit Signed-off-by: Junio C Hamano --- refs.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/refs.c b/refs.c index d3db15a76c..d6307ae29c 100644 --- a/refs.c +++ b/refs.c @@ -1086,6 +1086,15 @@ int delete_ref(const char *refname, const unsigned char *sha1, int delopt) return ret; } +/* + * People using contrib's git-new-workdir have .git/logs/refs -> + * /some/other/path/.git/logs/refs, and that may live on another device. + * + * IOW, to avoid cross device rename errors, the temporary renamed log must + * live into logs/refs. + */ +#define TMP_RENAMED_LOG "logs/refs/.tmp-renamed-log" + int rename_ref(const char *oldref, const char *newref, const char *logmsg) { static const char renamed_ref[] = "RENAMED-REF"; @@ -1119,8 +1128,8 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg) if (write_ref_sha1(lock, orig_sha1, logmsg)) return error("unable to save current sha1 in %s", renamed_ref); - if (log && rename(git_path("logs/%s", oldref), git_path("tmp-renamed-log"))) - return error("unable to move logfile logs/%s to tmp-renamed-log: %s", + if (log && rename(git_path("logs/%s", oldref), git_path(TMP_RENAMED_LOG))) + return error("unable to move logfile logs/%s to "TMP_RENAMED_LOG": %s", oldref, strerror(errno)); if (delete_ref(oldref, orig_sha1, REF_NODEREF)) { @@ -1146,7 +1155,7 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg) } retry: - if (log && rename(git_path("tmp-renamed-log"), git_path("logs/%s", newref))) { + if (log && rename(git_path(TMP_RENAMED_LOG), git_path("logs/%s", newref))) { if (errno==EISDIR || errno==ENOTDIR) { /* * rename(a, b) when b is an existing @@ -1159,7 +1168,7 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg) } goto retry; } else { - error("unable to move logfile tmp-renamed-log to logs/%s: %s", + error("unable to move logfile "TMP_RENAMED_LOG" to logs/%s: %s", newref, strerror(errno)); goto rollback; } @@ -1199,8 +1208,8 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg) error("unable to restore logfile %s from %s: %s", oldref, newref, strerror(errno)); if (!logmoved && log && - rename(git_path("tmp-renamed-log"), git_path("logs/%s", oldref))) - error("unable to restore logfile %s from tmp-renamed-log: %s", + rename(git_path(TMP_RENAMED_LOG), git_path("logs/%s", oldref))) + error("unable to restore logfile %s from "TMP_RENAMED_LOG": %s", oldref, strerror(errno)); return 1; From 29981380d03ffa63765dbeaea53a7ac9e8d6bc4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 6 Jul 2010 16:46:05 +0200 Subject: [PATCH 3/5] rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ?: operator has a lower priority than |, so the implicit associativity made the 6th argument of parse_options be PARSE_OPT_KEEP_DASHDASH if keep_dashdash was true discarding PARSE_OPT_STOP_AT_NON_OPTION and PARSE_OPT_SHELL_EVAL. Signed-off-by: Uwe Kleine-König Signed-off-by: Junio C Hamano --- builtin-rev-parse.c | 4 ++-- t/t1502-rev-parse-parseopt.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c index 45bead6545..b58531209e 100644 --- a/builtin-rev-parse.c +++ b/builtin-rev-parse.c @@ -397,8 +397,8 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix) ALLOC_GROW(opts, onb + 1, osz); memset(opts + onb, 0, sizeof(opts[onb])); argc = parse_options(argc, argv, prefix, opts, usage, - keep_dashdash ? PARSE_OPT_KEEP_DASHDASH : 0 | - stop_at_non_option ? PARSE_OPT_STOP_AT_NON_OPTION : 0); + (keep_dashdash ? PARSE_OPT_KEEP_DASHDASH : 0) | + (stop_at_non_option ? PARSE_OPT_STOP_AT_NON_OPTION : 0)); strbuf_addf(&parsed, " --"); sq_quote_argv(&parsed, argv, 0); diff --git a/t/t1502-rev-parse-parseopt.sh b/t/t1502-rev-parse-parseopt.sh index e504058062..3b612c67be 100755 --- a/t/t1502-rev-parse-parseopt.sh +++ b/t/t1502-rev-parse-parseopt.sh @@ -79,4 +79,22 @@ test_expect_success 'test --parseopt --keep-dashdash' ' test_cmp expect output ' +cat >expect <output && + test_cmp expect output +' + +cat > expect <output && + test_cmp expect output +' + test_done From c30e742c4981585061ed52c14abd9ebd32a0e18b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 7 Jul 2010 10:36:19 -0700 Subject: [PATCH 4/5] backmerge a few more fixes to 1.7.1.X series Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.7.1.2.txt | 19 +++++++++++++++++++ RelNotes | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 Documentation/RelNotes-1.7.1.2.txt diff --git a/Documentation/RelNotes-1.7.1.2.txt b/Documentation/RelNotes-1.7.1.2.txt new file mode 100644 index 0000000000..46b6a960c7 --- /dev/null +++ b/Documentation/RelNotes-1.7.1.2.txt @@ -0,0 +1,19 @@ +Git v1.7.1.2 Release Notes +========================== + +Fixes since v1.7.1.1 +-------------------- + + * "git commit" did not honor GIT_REFLOG_ACTION environment variable, resulting + reflog messages for cherry-pick and revert actions to be recorded as "commit". + + * "git clone/fetch/pull" issued an incorrect error message when a ref and + a symref that points to the ref were updated at the same time. This + obviously would update them to the same value, and should not result in + an error condition. + + * "git diff" inside a tree with many pathnames that have certain + characters has become very slow in 1.7.0 by mistake. + + * "git rev-parse --parseopt --stop-at-non-option" did not stop at non option + when --keep-dashdash was in effect. diff --git a/RelNotes b/RelNotes index 136c1b6afa..573ee74d24 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes-1.7.1.1.txt \ No newline at end of file +Documentation/RelNotes-1.7.1.2.txt \ No newline at end of file From 9918285fb10d81af9021dae99c5f4de88ded497c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 7 Jul 2010 11:19:42 -0700 Subject: [PATCH 5/5] Git 1.7.2-rc2 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.7.2.txt | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Documentation/RelNotes-1.7.2.txt b/Documentation/RelNotes-1.7.2.txt index b463fd2ae2..03832ff2f9 100644 --- a/Documentation/RelNotes-1.7.2.txt +++ b/Documentation/RelNotes-1.7.2.txt @@ -121,6 +121,8 @@ Updates since v1.7.1 highlighting, "plackup" support for instaweb, .fcgi suffix to run it as FastCGI script, etc. + * The test harness has been updated to produce TAP-friendly output. + Fixes since v1.7.1 ------------------ @@ -129,23 +131,11 @@ All of the fixes in v1.7.1.X maintenance series are included in this release, unless otherwise noted. * We didn't URL decode "file:///path/to/repo" correctly when path/to/repo - had percent-encoded characters (638794c, 9d2e942). - - * "git commit" did not honor GIT_REFLOG_ACTION environment variable, resulting - reflog messages for cherry-pick and revert actions to be recorded as "commit". - - * "git clone/fetch/pull" issued an incorrect error message when a ref and - a symref that points to the ref were updated at the same time. This - obviously would update them to the same value, and should not result in - an error condition (0e71bc3). + had percent-encoded characters (638794c, 9d2e942, ce83eda, 3c73a1d). * "git clone" did not configure remote.origin.url correctly for bare clones (df61c889). - * "git diff" inside a tree with many pathnames that have certain - characters has become very slow in 1.7.0 by mistake (will merge - e53e6b443 to 'maint'). - * "git diff --graph" works better with "--color-words" and other options (81fa024..4297c0a). @@ -157,6 +147,6 @@ release, unless otherwise noted. -- exec >/var/tmp/1 -O=v1.7.2-rc0-60-g2927a50 +O=v1.7.2-rc1-37-g2a16315 echo O=$(git describe HEAD) git shortlog --no-merges HEAD ^maint ^$O