From 6207011ae3fe813159e92762e86f33c9bd42cd7f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 8 May 2009 21:49:14 -0700 Subject: [PATCH 1/7] Start 1.6.3.1 maintenance series. Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.3.1.txt | 12 ++++++++++++ RelNotes | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Documentation/RelNotes-1.6.3.1.txt diff --git a/Documentation/RelNotes-1.6.3.1.txt b/Documentation/RelNotes-1.6.3.1.txt new file mode 100644 index 0000000000..98c02250bb --- /dev/null +++ b/Documentation/RelNotes-1.6.3.1.txt @@ -0,0 +1,12 @@ +GIT v1.6.3.1 Release Notes +========================== + +Fixes since v1.6.3 +------------------ + +-- +exec >/var/tmp/1 +O=v1.6.3 +echo O=$(git describe maint) +git shortlog $O..maint + diff --git a/RelNotes b/RelNotes index dd8bc4bb4a..0f6a588f1d 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes-1.6.3.txt \ No newline at end of file +Documentation/RelNotes-1.6.3.1.txt \ No newline at end of file From 3e1629f5a6c832941cc329c381de8b88ea775cb6 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 7 May 2009 01:08:19 -0700 Subject: [PATCH 2/7] archive-tar.c: squelch a type mismatch warning On some systems, giving a value of type time_t to printf "%lo" that expects an unsigned long would give a type mismatch warning. Signed-off-by: Junio C Hamano --- archive-tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive-tar.c b/archive-tar.c index ba890ebdec..cee06ce3cb 100644 --- a/archive-tar.c +++ b/archive-tar.c @@ -180,7 +180,7 @@ static int write_tar_entry(struct archiver_args *args, sprintf(header.mode, "%07o", mode & 07777); sprintf(header.size, "%011lo", S_ISREG(mode) ? size : 0); - sprintf(header.mtime, "%011lo", args->time); + sprintf(header.mtime, "%011lo", (unsigned long) args->time); sprintf(header.uid, "%07o", 0); sprintf(header.gid, "%07o", 0); From ac9f71cf766ab1affdfc4d4c4b58238bf9c76700 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Thu, 7 May 2009 01:57:08 +0300 Subject: [PATCH 3/7] git config: clarify --add and --get-color Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- Documentation/git-config.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 7131ee3c66..f68b198205 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -69,7 +69,8 @@ OPTIONS --add:: Adds a new line to the option without altering any existing - values. This is the same as providing '^$' as the value_regex. + values. This is the same as providing '^$' as the value_regex + in `--replace-all`. --get:: Get the value for a given key (optionally filtered by a regex @@ -155,7 +156,7 @@ See also <>. When the color setting for `name` is undefined, the command uses `color.ui` as fallback. ---get-color name default:: +--get-color name [default]:: Find the color configured for `name` (e.g. `color.diff.new`) and output it as the ANSI color escape sequence to the standard From 718135e3b6b5317f763477f5b0f408d888d79a8e Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Wed, 29 Apr 2009 23:40:50 +0200 Subject: [PATCH 4/7] Clarify kind of conflict in merge-one-file helper Not as verbose as the recursive merge driver, but better still. Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- git-merge-one-file.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index e1eb963266..9c2c1b7202 100755 --- a/git-merge-one-file.sh +++ b/git-merge-one-file.sh @@ -113,6 +113,10 @@ case "${1:-.}${2:-.}${3:-.}" in src1=`git-unpack-file $2` git merge-file "$src1" "$orig" "$src2" ret=$? + msg= + if [ $ret -ne 0 ]; then + msg='content conflict' + fi # Create the working tree file, using "our tree" version from the # index, and then store the result of the merge. @@ -120,7 +124,10 @@ case "${1:-.}${2:-.}${3:-.}" in rm -f -- "$orig" "$src1" "$src2" if [ "$6" != "$7" ]; then - echo "ERROR: Permissions conflict: $5->$6,$7." + if [ -n "$msg" ]; then + msg="$msg, " + fi + msg="${msg}permissions conflict: $5->$6,$7" ret=1 fi if [ "$1" = '' ]; then @@ -128,7 +135,7 @@ case "${1:-.}${2:-.}${3:-.}" in fi if [ $ret -ne 0 ]; then - echo "ERROR: Merge conflict in $4" + echo "ERROR: $msg in $4" exit 1 fi exec git update-index -- "$4" From ec00d6e0038e030cf73182374e21025c2776cb23 Mon Sep 17 00:00:00 2001 From: Alexander Potashev Date: Thu, 7 May 2009 16:04:08 +0400 Subject: [PATCH 5/7] Documentation: cloning to empty directory is allowed Cloning into an existing empty directory is now allowed: commit 55892d23981917aefdb387ad7d0429f90cbd446a ("Allow cloning to an existing empty directory") Signed-off-by: Alexander Potashev Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 4072f40d7a..b14de6c407 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -149,7 +149,7 @@ then the cloned repository will become corrupt. part of the source repository is used if no directory is explicitly given ("repo" for "/path/to/repo.git" and "foo" for "host.xz:foo/.git"). Cloning into an existing directory - is not allowed. + is only allowed if the directory is empty. :git-clone: 1 include::urls.txt[] From 49d833dc07f28bf67119c4060044fc829a7e044f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 12 May 2009 09:41:28 -0700 Subject: [PATCH 6/7] Revert "checkout branch: prime cache-tree fully" The logic in 83ae209 (checkout branch: prime cache-tree fully, 2009-04-20) is bogus; checkout can switch branches with a dirty index and in such a case the tree won't match HEAD. Add t2014-switch to catch this breakage. Signed-off-by: Junio C Hamano --- builtin-checkout.c | 9 +-------- t/t2014-switch.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 8 deletions(-) create mode 100755 t/t2014-switch.sh diff --git a/builtin-checkout.c b/builtin-checkout.c index efa1ebfe07..ffdb33aef5 100644 --- a/builtin-checkout.c +++ b/builtin-checkout.c @@ -368,17 +368,14 @@ static int merge_working_tree(struct checkout_opts *opts, int ret; struct lock_file *lock_file = xcalloc(1, sizeof(struct lock_file)); int newfd = hold_locked_index(lock_file, 1); - int reprime_cache_tree = 0; if (read_cache() < 0) return error("corrupt index file"); - cache_tree_free(&active_cache_tree); if (opts->force) { ret = reset_tree(new->commit->tree, opts, 1); if (ret) return ret; - reprime_cache_tree = 1; } else { struct tree_desc trees[2]; struct tree *tree; @@ -414,9 +411,7 @@ static int merge_working_tree(struct checkout_opts *opts, init_tree_desc(&trees[1], tree->buffer, tree->size); ret = unpack_trees(2, trees, &topts); - if (ret != -1) { - reprime_cache_tree = 1; - } else { + if (ret == -1) { /* * Unpack couldn't do a trivial merge; either * give up or do a real merge, depending on @@ -460,8 +455,6 @@ static int merge_working_tree(struct checkout_opts *opts, } } - if (reprime_cache_tree) - prime_cache_tree(&active_cache_tree, new->commit->tree); if (write_cache(newfd, active_cache, active_nr) || commit_locked_index(lock_file)) die("unable to write new index file"); diff --git a/t/t2014-switch.sh b/t/t2014-switch.sh new file mode 100755 index 0000000000..ccfb147113 --- /dev/null +++ b/t/t2014-switch.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +test_description='Peter MacMillan' +. ./test-lib.sh + +test_expect_success setup ' + echo Hello >file && + git add file && + test_tick && + git commit -m V1 && + echo Hello world >file && + git add file && + git checkout -b other +' + +test_expect_success 'check all changes are staged' ' + git diff --exit-code +' + +test_expect_success 'second commit' ' + git commit -m V2 +' + +test_expect_success 'check' ' + git diff --cached --exit-code +' + +test_done From 4774780ab196ff4ace780445c06c8e5bfffffc49 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 12 May 2009 22:28:22 -0700 Subject: [PATCH 7/7] GIT 1.6.3.1 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.3.1.txt | 10 ++++------ GIT-VERSION-GEN | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Documentation/RelNotes-1.6.3.1.txt b/Documentation/RelNotes-1.6.3.1.txt index 98c02250bb..2400b72ef7 100644 --- a/Documentation/RelNotes-1.6.3.1.txt +++ b/Documentation/RelNotes-1.6.3.1.txt @@ -4,9 +4,7 @@ GIT v1.6.3.1 Release Notes Fixes since v1.6.3 ------------------ --- -exec >/var/tmp/1 -O=v1.6.3 -echo O=$(git describe maint) -git shortlog $O..maint - +* "git checkout -b new-branch" with a staged change in the index + incorrectly primed the in-index cache-tree, resulting a wrong tree + object to be written out of the index. This is a grave regression + since the last 1.6.2.X maintenance release. diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 39cde784c9..d292e3a2d3 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.6.3.GIT +DEF_VER=v1.6.3.1 LF=' '