diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-01-20 13:01:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-20 13:01:19 -0800 |
commit | f0b0d78489407f9b934cc0d4ae83e078553acbcd (patch) | |
tree | 46e521b9f27928a33fa4646e4adaf2107c2a25bc /builtin-reset.c | |
parent | 6329bade6632a9df4b37dd3a7f8d641eed74bbf5 (diff) | |
parent | 35eabd1579726d594e84fc8328a5c87693dd065a (diff) | |
download | git-f0b0d78489407f9b934cc0d4ae83e078553acbcd.tar.gz git-f0b0d78489407f9b934cc0d4ae83e078553acbcd.tar.xz |
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
Diffstat (limited to 'builtin-reset.c')
-rw-r--r-- | builtin-reset.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin-reset.c b/builtin-reset.c index 11d1c6e4d..e4418bced 100644 --- a/builtin-reset.c +++ b/builtin-reset.c @@ -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 |