diff options
author | Martin von Zweigbergk <martinvonz@gmail.com> | 2013-01-14 21:47:36 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-15 09:38:07 -0800 |
commit | 4f4ad3d938beafd785c319664348268bbef11a00 (patch) | |
tree | cd7da1f9a0a6e5db72eb1cbfaca122d0cd4c2f76 /git-gui/lib/status_bar.tcl | |
parent | reset.c: pass pathspec around instead of (prefix, argv) pair (diff) | |
download | tgif-4f4ad3d938beafd785c319664348268bbef11a00.tar.xz |
reset: don't allow "git reset -- $pathspec" in bare repo
Running e.g. "git reset ." in a bare repo results in an index file
being created from the HEAD commit. The differences compared to the
index are then printed as usual, but since there is no worktree, it
will appear as if all files are deleted. For example, in a bare clone
of git.git:
Unstaged changes after reset:
D .gitattributes
D .gitignore
D .mailmap
...
This happens because the check for is_bare_repository() happens after
we branch off into read_from_tree() to reset with paths. Fix by moving
the branching point after the check.
Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/status_bar.tcl')
0 files changed, 0 insertions, 0 deletions