summaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-11-01 15:38:49 +0100
committerJunio C Hamano <gitster@pobox.com>2013-11-01 15:38:49 +0100
commit1feb458fb956cc8991267b00f33b91766dfadaad (patch)
tree7447c3c6b26275919de285a1ee9ce44d14dbf85f /builtin
parentMerge branch 'jk/pack-corruption-post-mortem' (diff)
parentreset: pass real rev name to add--interactive (diff)
downloadgit-1feb458fb956cc8991267b00f33b91766dfadaad.tar.xz
git-1feb458fb956cc8991267b00f33b91766dfadaad.zip
Merge branch 'jk/reset-p-current-head-fix'
"git reset -p HEAD" has codepath to special case it from resetting to contents of other commits, but recent change broke it. * jk/reset-p-current-head-fix: reset: pass real rev name to add--interactive add-interactive: handle unborn branch in patch mode
Diffstat (limited to 'builtin')
-rw-r--r--builtin/reset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/reset.c b/builtin/reset.c
index f2f9d55392..60048030dd 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -304,7 +304,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (patch_mode) {
if (reset_type != NONE)
die(_("--patch is incompatible with --{hard,mixed,soft}"));
- return run_add_interactive(sha1_to_hex(sha1), "--patch=reset", &pathspec);
+ return run_add_interactive(rev, "--patch=reset", &pathspec);
}
/* git reset tree [--] paths... can be used to