author | Christian Couder <chriscool@tuxfamily.org> | |
Wed, 30 Dec 2009 05:54:44 +0000 (06:54 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 30 Dec 2009 09:09:43 +0000 (01:09 -0800) | ||
commit | 2b06b0a02f8d0aa01c8ff19b72c9292afd7a84fe | |
tree | 063e6ade320dd09677790b9d12824b5876dec08f | tree | snapshot |
parent | 902f235378cb2b2f6dd5dd664b9630c95321f0ae | commit | diff |
reset: improve mixed reset error message when in a bare repo
When running a "git reset --mixed" in a bare repository, the
message displayed is something like:
fatal: This operation must be run in a work tree
fatal: Could not reset index file to revision 'HEAD^'.
This message is a little bit misleading because a mixed reset is
ok in a git directory, so it is not absolutely needed to run it in
a work tree.
So this patch improves upon the above by changing the message to:
fatal: mixed reset is not allowed in a bare repository
And if "git reset" is ever sped up by using unpack_tree() directly
(instead of execing "git read-tree"), this patch will also make
sure that a mixed reset is still disallowed in a bare repository.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When running a "git reset --mixed" in a bare repository, the
message displayed is something like:
fatal: This operation must be run in a work tree
fatal: Could not reset index file to revision 'HEAD^'.
This message is a little bit misleading because a mixed reset is
ok in a git directory, so it is not absolutely needed to run it in
a work tree.
So this patch improves upon the above by changing the message to:
fatal: mixed reset is not allowed in a bare repository
And if "git reset" is ever sped up by using unpack_tree() directly
(instead of execing "git read-tree"), this patch will also make
sure that a mixed reset is still disallowed in a bare repository.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-reset.c | diff | blob | history |