Strange diff-index output

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

 



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.
This script works fine on developer's machines, but doesn't on our CI
system (Atlassian Bamboo/Stash).

HEAD points to refs/heads/FIX-XYZ and refs/heads/FIX-XYZ exists.

On our CI, the output of diff-index gives something like:
:100644 100644 abcdef 000000 M file1

Our problem is very likely related with how Bamboo works and/or how we
use it, but to investigate this issue further, I first would like to
understand the meaning of the above output.

>From the man page of diff-index:
- 100644 is the mode of "src"
- 100644 is the mode of dst
- abcdef is the hash of src
- 000000 is the hash of dst
- M stands for "Modified"
- file1 is the filename being considered.

>From my understanding, src here means the file system and dst the git
object. So the above should mean "file1" is new and out of sync with
the index, which doesn't make sense since "file1" is definitely in the
repository. The weird stuff is that diff-index report the same problem
on every single file no just a few!

Notes:
 - Something I've noticed with Bamboo is that the cloned repository
doesn't have any remotes. Although I'm not sure if it is relevant
here.
 - I have tried with "shallow copy" Bamboo option enabled or not and I
get the same problems
 - I have tried "git update-index", but still get the same results
 - git log still gives me the full log history (but no remote heads)
 - git status reports nothing else than a couple of generated files
 - git status HEAD reports that the working directory is clean
 - git diff-index --cached reports nothing

Does any of you have ever come across this kind of problem? Could
anyone shed some light on what's going on with our clone? Any
documentation point out or hints appreciated.

Thanks,
Chris
--
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]