Re: Strange diff-index output

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

 



On Tue, 2015-11-03 at 12:59 +1300, Ch'Gans wrote:
> Hi there,
> 
> We're using a script to verify that what we are building is clean
> against our git repository, for this we're using "git rev-parse
> --short HEAD" to get the current hash and "git diff-index --quiet
> HEAD" to check for local modification.

See this note from the git diff-index man page:
           Note
           As with other commands of this type, git diff-index does not
           actually look at the contents of the file at all. So maybe
           kernel/sched.c hasn’t actually changed, and it’s just that
you
           touched it. In either case, it’s a note that you need to git
           update-index it to make the index be in sync.

You can either add an update-index to your script, or use git status
--porcelain.

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