Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
reset [--mixed]: use diff-based reset whether or not pathspec was given
[gitweb.git]
/
builtin
/
reset.c
diff --git
a/builtin/reset.c
b/builtin/reset.c
index 45b01ebbcc81cb0acde12b97eea1ae9afd341559..921afbe62eaf816108b5e25d7ed2c68d12008522 100644
(file)
--- a/
builtin/reset.c
+++ b/
builtin/reset.c
@@
-322,7
+322,7
@@
int cmd_reset(int argc, const char **argv, const char *prefix)
if (reset_type != SOFT) {
struct lock_file *lock = xcalloc(1, sizeof(struct lock_file));
int newfd = hold_locked_index(lock, 1);
- if (
pathspec
) {
+ if (
reset_type == MIXED
) {
if (read_from_tree(pathspec, sha1))
return 1;
} else {