aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-20 13:01:19 -0800
committerJunio C Hamano <gitster@pobox.com>2010-01-20 13:01:19 -0800
commitf0b0d78489407f9b934cc0d4ae83e078553acbcd (patch)
tree46e521b9f27928a33fa4646e4adaf2107c2a25bc
parent6329bade6632a9df4b37dd3a7f8d641eed74bbf5 (diff)
parent35eabd1579726d594e84fc8328a5c87693dd065a (diff)
downloadgit-f0b0d78489407f9b934cc0d4ae83e078553acbcd.tar.gz
git-f0b0d78489407f9b934cc0d4ae83e078553acbcd.tar.xz
Merge branch 'maint-1.6.5' into maint
* maint-1.6.5: Git 1.6.5.8 Fix mis-backport of t7002 bash completion: factor submodules into dirty state reset: unbreak hard resets with GIT_WORK_TREE Conflicts: Documentation/git.txt GIT-VERSION-GEN RelNotes
-rw-r--r--Documentation/RelNotes-1.6.5.8.txt28
-rw-r--r--Documentation/git.txt3
-rw-r--r--builtin-reset.c6
-rwxr-xr-xcontrib/completion/git-completion.bash6
-rwxr-xr-xt/t7103-reset-bare.sh6
5 files changed, 40 insertions, 9 deletions
diff --git a/Documentation/RelNotes-1.6.5.8.txt b/Documentation/RelNotes-1.6.5.8.txt
new file mode 100644
index 000000000..8b24bebb9
--- /dev/null
+++ b/Documentation/RelNotes-1.6.5.8.txt
@@ -0,0 +1,28 @@
+Git v1.6.5.8 Release Notes
+==========================
+
+Fixes since v1.6.5.7
+--------------------
+
+* "git count-objects" did not handle packfiles that are bigger than 4G on
+ platforms with 32-bit off_t.
+
+* "git rebase -i" did not abort cleanly if it failed to launch the editor.
+
+* "git blame" did not work well when commit lacked the author name.
+
+* "git fast-import" choked when handling a tag that points at an object
+ that is not a commit.
+
+* "git reset --hard" did not work correctly when GIT_WORK_TREE environment
+ variable is used to point at the root of the true work tree.
+
+* "git grep" fed a buffer that is not NUL-terminated to underlying
+ regexec().
+
+* "git checkout -m other" while on a branch that does not have any commit
+ segfaulted, instead of failing.
+
+* "git branch -a other" should have diagnosed the command as an error.
+
+Other minor documentation updates are also included.
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 352c23019..c05efdaa6 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -48,9 +48,10 @@ Documentation for older releases are available here:
* release notes for
link:RelNotes-1.6.6.txt[1.6.6].
-* link:v1.6.5.7/git.html[documentation for release 1.6.5.7]
+* link:v1.6.5.8/git.html[documentation for release 1.6.5.8]
* release notes for
+ link:RelNotes-1.6.5.8.txt[1.6.5.8],
link:RelNotes-1.6.5.7.txt[1.6.5.7],
link:RelNotes-1.6.5.6.txt[1.6.5.6],
link:RelNotes-1.6.5.5.txt[1.6.5.5],
diff --git a/builtin-reset.c b/builtin-reset.c
index 11d1c6e4d..e4418bced 100644
--- a/builtin-reset.c
+++ b/builtin-reset.c
@@ -286,10 +286,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (reset_type == NONE)
reset_type = MIXED; /* by default */
- if ((reset_type == HARD || reset_type == MERGE)
- && !is_inside_work_tree())
- die("%s reset requires a work tree",
- reset_type_names[reset_type]);
+ if (reset_type == HARD || reset_type == MERGE)
+ setup_work_tree();
/* Soft reset does not touch the index file nor the working tree
* at all, but requires them in a good order. Other resets reset
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index fbfa5f25c..1a9943c01 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -142,11 +142,9 @@ __git_ps1 ()
elif [ "true" = "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ]; then
if [ "$(git config --bool bash.showDirtyState)" != "false" ]; then
- git diff --no-ext-diff --ignore-submodules \
- --quiet --exit-code || w="*"
+ git diff --no-ext-diff --quiet --exit-code || w="*"
if git rev-parse --quiet --verify HEAD >/dev/null; then
- git diff-index --cached --quiet \
- --ignore-submodules HEAD -- || i="+"
+ git diff-index --cached --quiet HEAD -- || i="+"
else
i="#"
fi
diff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh
index 68041df5f..afb55b3a4 100755
--- a/t/t7103-reset-bare.sh
+++ b/t/t7103-reset-bare.sh
@@ -29,6 +29,12 @@ test_expect_success 'soft reset is ok' '
(cd .git && git reset --soft)
'
+test_expect_success 'hard reset works with GIT_WORK_TREE' '
+ mkdir worktree &&
+ GIT_WORK_TREE=$PWD/worktree GIT_DIR=$PWD/.git git reset --hard &&
+ test_cmp file worktree/file
+'
+
test_expect_success 'setup bare' '
git clone --bare . bare.git &&
cd bare.git