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
This commit is contained in:
Junio C Hamano 2010-01-20 13:01:19 -08:00
commit f0b0d78489
5 changed files with 40 additions and 9 deletions

View File

@ -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.

View File

@ -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],

View File

@ -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

View File

@ -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

View File

@ -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