Re: Excluding files from git-diff

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

 



Jeff King wrote:
No, I don't think there is a way to do that currently. I would probably
generate the file list with a shell snippet:

  git diff -- `git ls-files | grep -v .gitignore`

but obviously that is a lot more typing if this is something you are
doing frequently.

The problem with this is that it won't show files that aren't there anymore but have been previously; in general, for that to work (also with git log, for example), the list of files would need to include all paths which have ever existed and which are not to be excluded. Even then, I'm not sure whether there are corner case where it would not work (when files are being renamed, for example?).

If I/we (after finishing my intergit-find-matching-commit-in experiment) finally decide that tracking generated files in the same repository is the right thing to do, then I guess the only way to ignore those cleanly would be to add an inverse match feature to the Git core.

Christian.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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