[PATCH v2 0/2] improve interactive-patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let's reduce the verbosity in the interactive-patch process, in order to
make it less confusing.

Rubén Justo (2):
  add-patch: introduce 'p' in interactive-patch
  add-patch: do not print hunks repeatedly

 Documentation/git-add.txt  |  1 +
 add-patch.c                | 20 +++++++++++++++-----
 t/t3701-add-interactive.sh | 22 +++++++++++-----------
 3 files changed, 27 insertions(+), 16 deletions(-)

Range-diff against v1:
1:  48a2c63b78 ! 1:  5e319f439d add-patch: introduce 'p' in interactive-patch
    @@ Commit message
     
         Signed-off-by: Rubén Justo <rjusto@xxxxxxxxx>
     
    + ## Documentation/git-add.txt ##
    +@@ Documentation/git-add.txt: patch::
    +        K - leave this hunk undecided, see previous hunk
    +        s - split the current hunk into smaller hunks
    +        e - manually edit the current hunk
    ++       p - print again the current hunk
    +        ? - print help
    + +
    + After deciding the fate for all hunks, if there is any hunk
    +
      ## add-patch.c ##
     @@ add-patch.c: N_("j - leave this hunk undecided, see next undecided hunk\n"
         "/ - search for a hunk matching the given regex\n"
    @@ add-patch.c: static int patch_update_file(struct add_p_state *s,
      				goto soft_increment;
      			}
     +		} else if (s->answer.buf[0] == 'p') {
    -+			/* nothing to do */
    ++			/* nothing special is needed */
      		} else {
      			const char *p = _(help_patch_remainder), *eol = p;
      
2:  1730493096 ! 2:  1177bfeae4 add-patch: do not print hunks repeatedly
    @@ Commit message
             g - select a hunk to go to
             / - search for a hunk matching the given regex
             e - manually edit the current hunk
    +        p - print again the current hunk
             ? - print help
             @@ -1394,7 +1394,7 @@ N_("j - leave this hunk undecided, see next undecided hunk\n"
              static int patch_update_file(struct add_p_state *s,
    @@ add-patch.c: static int patch_update_file(struct add_p_state *s,
      				goto soft_increment;
      			}
      		} else if (s->answer.buf[0] == 'p') {
    --			/* nothing to do */
    +-			/* nothing special is needed */
     +			prev_hunk_index = -1;
      		} else {
      			const char *p = _(help_patch_remainder), *eol = p;
-- 
2.44.0.494.gfaa70abb0d




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux