I have a commit id that our CI system complained about. I did a git show of it and the output looks like the following:
$ git show --quiet 36133babfd594450bd499d82edd6160601c35dcb
tree 36133babfd594450bd499d82edd6160601c35dcb
.gitignore
Makefile.am
Pipfile
README.md
autest.sh
gold_tests/
include/
prepare_proxy_verifier.sh
proxy-verifier-version.txt
test-env-check.sh
tools/
unit_tests/
In my years of using git I've never seen a commit that looks like that. I'm used to git show showing something like this:
$ git show --quiet HEAD
commit 7e0a85e3bdd716e91a6f28748a8e93350a7389b1
Author: Evan Zelkowitz <eze@apache.org>
Date: Tue Mar 2 09:56:07 2021 -0700
Add tscontdestroy when transaction is closed and pacing rate is reset (#7572)
Note it says who the committer is, the date, and repeats the commit id. The git show for the former id shows none of this.
If I do any searches on "git show tree" (please pity me, look at that output - what else can I search on?) I do not get any useful information. The "tree" is interpreted as a tree of commits, not as something related to this output.
Can someone who recognizes this output please explain it to me? I'm seeing this in the following open source git repository:
https://github.com/apache/trafficserver
Update
Chris Maes and meagar's answers (and Dev-vruper's comment) gave me enough context to understand what had happened. I originally noticed this issue from the following git fetch failure on our jenkins box:
Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git fetch --tags --progress http://192.168.3.1/mirror/trafficserver.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: error: Unable to find 36133babfd594450bd499d82edd6160601c35dcb under http://192.168.3.1/mirror/trafficserver.git
Cannot obtain needed tree 36133babfd594450bd499d82edd6160601c35dcb
while processing commit 46ab6ca5b97b2103d7977a0b36f4a7948ddf3e3e.
error: Fetch failed.
Note that while processing commit 46ab6ca5b97b2103d7977a0b36f4a7948ddf3e3e it had trouble getting 36133babfd594450bd499d82edd6160601c35dcb. The former is a commit object and the latter is a "tree" object. It looks like that local repo had somehow been corrupted such that the tree referenced in that commit could not longer be read. Removal of the repo and recloning fixed the issue.
For details about git objects (trees, blobs, commits, etc.), please see the link Dev-vruper referenced: http://git-scm.com/book/en/v2/Git-Internals-Git-Objects