]> git.ipfire.org Git - thirdparty/git.git/blobdiff - add-patch.c
Merge branch 'pb/ref-filter-with-crlf'
[thirdparty/git.git] / add-patch.c
index bd94bd3a7c9e86f4af6d9b887c824ff5be2db9a5..be4cf6e9e5d733e477737be5d5a77fe3ccf48e24 100644 (file)
@@ -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