* git diff --git-ignore
@ 2021-09-19 23:50 Aaron Gray
2021-09-20 2:23 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Aaron Gray @ 2021-09-19 23:50 UTC (permalink / raw)
To: Git Mailing List
Hi,
Is it possible to add a --git-ignore flag to git diff so I only see
the diffs for what I really want to be looking at, and not what I
don't ;)
Regards,
Aaron
--
Aaron Gray
Independent Open Source Software Engineer, Computer Language
Researcher, Information Theorist, and amateur computer scientist.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git diff --git-ignore
2021-09-19 23:50 git diff --git-ignore Aaron Gray
@ 2021-09-20 2:23 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2021-09-20 2:23 UTC (permalink / raw)
To: Aaron Gray; +Cc: Git Mailing List
Aaron Gray <aaronngray.lists@gmail.com> writes:
> Is it possible to add a --git-ignore flag to git diff so I only see
> the diffs for what I really want to be looking at, and not what I
> don't ;)
How does your --git-ignore option exactly guess differences for
which paths to show and which paths to exclude? How do you tell the
"git diff --git-ignore" command which paths are what you really want
to be looking at?
If it is by magic, good luck writing such a feature ;-)
If it is like "I only am interested in changes in src/ directory and
the top-level Makefile", then perhaps using pathspec is what you
want. E.g.
$ git diff -- src/ Makefile
$ git diff --cached -- src/ Makefile
$ git diff master topic -- src/ Makefile
$ git diff master...topic -- src/ Makefile
Modern Git even allows you to include negative elements to the
pathspec, e.g.
$ git diff src/ ':(exclude)*.h'
would tell us "show only changes in the src/ directory, but do not
bother with changes to the dot-h files".
HTH
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-20 2:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-19 23:50 git diff --git-ignore Aaron Gray
2021-09-20 2:23 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).