Skip to content

Commit

Permalink
Merge branch 'maint-1.6.5' into maint
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Junio C Hamano committed Jan 20, 2010
2 parents 6329bad + 35eabd1 commit f0b0d78
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 9 deletions.
28 changes: 28 additions & 0 deletions Documentation/RelNotes-1.6.5.8.txt
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 2 additions & 1 deletion Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
6 changes: 2 additions & 4 deletions builtin-reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions t/t7103-reset-bare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f0b0d78

Please sign in to comment.