Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'add-patch.c')
-rw-r--r--add-patch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/add-patch.c b/add-patch.c
index bd94bd3a7c..be4cf6e9e5 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1695,6 +1695,14 @@ int run_add_p(struct repository *r, enum add_p_mode mode,
if (mode == ADD_P_STASH)
s.mode = &patch_mode_stash;
else if (mode == ADD_P_RESET) {
+ /*
+ * NEEDSWORK: Instead of comparing to the literal "HEAD",
+ * compare the commit objects instead so that other ways of
+ * saying the same thing (such as "@") are also handled
+ * appropriately.
+ *
+ * This applies to the cases below too.
+ */
if (!revision || !strcmp(revision, "HEAD"))
s.mode = &patch_mode_reset_head;
else