There has been a recent bit of movement on the Git list regardin "git
add -p".

See
https://public-inbox.org/git/20180316101346.7137-1-phillip.w...@talktalk.net/
which may give you an option to discuss this ...

Subject: [PATCH v3 0/3] add -p: select individual hunk lines

----- Original Message ----- From: "Frederik Hanghøj Iversen" <fhi.1...@gmail.com>
To: "Git for human beings" <git-users@googlegroups.com>
Sent: Wednesday, May 23, 2018 4:31 PM
Subject: [git-users] Re: how to make a 'git add --patch' using --word-diff?


Hey Joe

I'm interested in this feature as well, I was curious if you ever did
request this feature as per Thomas' suggestion.

Sorry for waking this thread up from the dead.

On Monday, October 29, 2012 at 10:44:51 AM UTC+1, Thomas Ferris Nicolaisen
wrote:

On Monday, October 29, 2012 1:02:22 AM UTC+1, Joe Cabezas wrote:

my project have files with very large lines (very common in latex
projects), sometimes i have to modify a single word, and is very simple
to
see differences using

git diff --word-diff

but when I want to make a

git add --patch

show hunks like 'git diff' without --word-diff option... and is very
difficult to see whats is the difference


there is any way to see differences word by word in git add?


I doubt this is possible today. As far as I can judge from reading the
docs, git add -p uses the Interactive Mode of git add, which operates on
"hunks". Hunks *are* inherently line diffs, and can even be edited on the
fly during an interactive add, and I guess this is why they can't be
handled as mere diffs.

Of course, this should be possible to implement inside of Git, but I
doubt
it's a feature in high demand.. Most users out there don't stage hunks,
and
most people who do are already used to line-diffs.

You could of course suggest it as a feature to the Git development list.
In the mean time, I would suggest combining two console windows to
achieve
what you want:

   - in the first window, run git add -p, and
   - in the second run git diff --word-diff to guide you through the
   process.



--
You received this message because you are subscribed to the Google Groups
"Git for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to