]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-add--interactive.perl
Merge branch 'js/default-branch-name-adjust-t5411'
[thirdparty/git.git] / git-add--interactive.perl
index 8a720187125798e7e18d145a68210f0d9e6780f7..e713fe3d022effd7905317b25d26bc6ab84914c5 100755 (executable)
@@ -1830,6 +1830,13 @@ sub process_args {
                                $arg = shift @ARGV or die __("missing --");
                                if ($arg ne '--') {
                                        $patch_mode_revision = $arg;
+
+                                       # 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.
                                        $patch_mode = ($arg eq 'HEAD' ?
                                                       'reset_head' : 'reset_nothead');
                                        $arg = shift @ARGV or die __("missing --");