diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-13 12:28:53 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-13 13:25:51 -0800 |
commit | 245de36f035f9d549df2b1509787c25648fd611f (patch) | |
tree | 3ce82b4fc6c5ac8aca39a6f648f0f3d62018110a /git-gui/lib/error.tcl | |
parent | t/t3404: fix test for a bogus todo file. (diff) | |
download | tgif-245de36f035f9d549df2b1509787c25648fd611f.tar.xz |
revert/cherry-pick: allow starting from dirty work tree.
There is no reason to forbid a dirty work tree when reverting or
cherry-picking a change, as long as the index is clean.
The scripted version used to allow it:
case "$no_commit" in
t)
# We do not intend to commit immediately. We just want to
# merge the differences in.
head=$(git-write-tree) ||
die "Your index file is unmerged."
;;
*)
head=$(git-rev-parse --verify HEAD) ||
die "You do not have a valid HEAD"
files=$(git-diff-index --cached --name-only $head) || exit
if [ "$files" ]; then
die "Dirty index: cannot $me (dirty: $files)"
fi
;;
esac
but C rewrite tightened the check, probably by mistake.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/error.tcl')
0 files changed, 0 insertions, 0 deletions