Question: how to have ls-files use the .gitignore in the index

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

 



I have a pre-commit hook that checks the index for files that match the
ignores / excludes in the repository. But sometimes this will run on a
repository where not all the folders are up-to-date with the tip, and
will then test against the working tree versions of these files and not
those in the index.

from pre-commit:

	if git ls-files -i --exclude-standard | grep .
	then
	    exit 1
	fi 

Is there an option to have ls-files use the excludes in the index
without checking out the whole file tree?

Thanks,

--
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]