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 'git-add--interactive.perl')
-rwxr-xr-xgit-add--interactive.perl7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 8a72018712..e713fe3d02 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -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 --");