]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'js/checkout-p-new-file'
authorJunio C Hamano <gitster@pobox.com>
Tue, 9 Jun 2020 01:06:31 +0000 (18:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Jun 2020 01:06:31 +0000 (18:06 -0700)
"git checkout -p" did not handle a newly added path at all.

* js/checkout-p-new-file:
  checkout -p: handle new files correctly

1  2 
add-patch.c
t/t3701-add-interactive.sh

diff --cc add-patch.c
index d8bfe379be4d50893b8b977efff9c79de54b38af,eaace1b824f6f5efdcb2771a0f1214edd7b92699..f899389e2cc2359d255f9a74430ef2a995fba004
@@@ -7,10 -7,9 +7,10 @@@
  #include "color.h"
  #include "diff.h"
  #include "compat/terminal.h"
 +#include "prompt.h"
  
  enum prompt_mode_type {
-       PROMPT_MODE_CHANGE = 0, PROMPT_DELETION, PROMPT_HUNK,
+       PROMPT_MODE_CHANGE = 0, PROMPT_DELETION, PROMPT_ADDITION, PROMPT_HUNK,
        PROMPT_MODE_MAX, /* must be last */
  };
  
Simple merge