short version
How can I get a reasonably detailed, human-readable dump of .git/index
?
tl;dr version
I have two index files, myrepo/.git/index
and myrepo-copy/.git/index
that are different according to diff
("Binary files ... differ").
I'd like to know more details on how the two index files differ.
Of course, I could look at the differences in the binary content, but I'm interested in something more immediately meaningful.
Therefore I'm looking for a way to get human-readable dumps of these two index files that I can compare with diff
.
I would suggest something along these lines:
diff <(GIT_INDEX_FILE=/path/to/index1 git ls-files --stage) <(GIT_INDEX_FILE=/path/to/index2 git ls-files --stage)
As you've already noted, you can add the --debug
option to get info on timestamps and other stuff as well...
OK, after I posted my question I learned that the following produces a fairly comprehensive dump of the index:
% git ls-files --stage --debug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With