Re: confused git diff -G

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

 



On Thu, Aug 24, 2023 at 6:56 PM Taylor Blau <me@xxxxxxxxxxxx> wrote:
>
> On Thu, Aug 24, 2023 at 06:08:18PM -0400, Alexei Podtelezhnikov wrote:
> > I find this sections of the docs confusing:
> >
> > git diff -G (https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/diff-options.txt#n656)
> >
> >  I do not follow why the example talks about `git log -G` and commits.
> > I see that thai file is included in git-log .txt but I do not
> > understand how to use git  diff -G.
>
> I agree that it can be somewhat confusing :-).

[skip to the practical example]

> given to `-G`, like so:
>
>     $ git -C repo diff --stat HEAD^
>      a | 1 +
>      b | 1 +
>      2 files changed, 2 insertions(+)
>     $ git -C repo diff --stat HEAD^ -G a
>      a | 1 +
>      1 file changed, 1 insertion(+)
>     $ git -C repo diff --stat HEAD^ -G b
>      b | 1 +
>      1 file changed, 1 insertion(+)

Do you mean that-G is only useful to filter files and not the content
of changes? That I can do without -G. Canyou give a better example?




[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