Re: git-walkthrough-add script

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git-walkthrough-add script

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:02

William Morgan [off-list ref] writes:
Excerpts from Jeff King's message of Fri Jan 04 13:07:51 -0800 2008:
quoted
But if you have interface improvement suggestions for "git-add -i" or
"git-add -p", I'm sure they would be well-received (post-1.5.4
release, of course).
Not to show off my git newbness any more than necessary, but when I run
both git-add -i and git-add -p, I see exactly the same output and
interface. Are they meant to be different?
They are meant to be different.

    $ git reset --hard
    $ echo >>Makefile
    $ echo >>psql/Makefile
    $ git add -p
    diff --git a/Makefile b/Makefile
    index a2177bc..eb250b0 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -54,3 +54,4 @@ snapdiff ::
            latest=`ls -1dr $(_snap)/release-????-??-?? | head -n 1` &&
            \
            diff -X dontdiff -ru "$$latest" .

    +
    Stage this hunk [y/n/a/d/?]? ^C

    $ git add -i
               staged     unstaged path
      1:    unchanged        +1/-0 Makefile
      2:    unchanged        +1/-0 psql/Makefile

    *** Commands ***
      1: [s]tatus     2: [u]pdate     3: [r]evert     4: [a]dd
      untracked
      5: [p]atch      6: [d]iff       7: [q]uit       8: [h]elp
    What now> ^C

There may be something broken with your git installation.

Re: git-walkthrough-add script

From: Pedro Melo <hidden>
Date: 2016-06-15 22:44:02

On Jan 5, 2008, at 2:50 AM, Junio C Hamano wrote:
They are meant to be different.

    $ git reset --hard
    $ echo >>Makefile
    $ echo >>psql/Makefile
    $ git add -p
    diff --git a/Makefile b/Makefile
    index a2177bc..eb250b0 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -54,3 +54,4 @@ snapdiff ::
            latest=`ls -1dr $(_snap)/release-????-??-?? | head -n  
1` &&
            \
            diff -X dontdiff -ru "$$latest" .

    +
    Stage this hunk [y/n/a/d/?]? ^C
BTW, I'm using 1.5.4rc2 and this prompt shows:

Stage this hunk [y/n/a/d/j/J/?]?

but the help (after you press ?) also mentions:

k - leave this hunk undecided, see previous undecided hunk
K - leave this hunk undecided, see previous hunk
s - split the current hunk into smaller hunks

but those three options don't seem to work.

Best regards,
-- 
Pedro Melo
Blog: http://www.simplicidade.org/notes/
XMPP ID: melo@simplicidade.org
Use XMPP!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help