0

While working on gitmod, I noticed that the old root_tree is not being discarded when I stop using it. After tracking what was going on, I noticed that there's an object inside a tree that is not a blob or another tree. It's a commit object. This is from git's repo:

$ git ls-tree v2.28.0 | grep sha1col
160000 commit 855827c583bc30645ba427885caa40c5b81764d2  sha1collisiondetection

I need to add support for it so that it is managed correctly but I was wondering what it represents. Because I was trying to get information about the object and it's not in my repo:

$ git cat-file -p 855827c583bc30645ba427885caa40c5b81764d2
fatal: Not a valid object name 855827c583bc30645ba427885caa40c5b81764d2

1 Answer 1

3

That's a submodule. You can see that the path (sha1collisiondetection) is indexed in the .gitmodules file in the root of the repository:

[submodule "sha1collisiondetection"]
    path = sha1collisiondetection
    url = https://github.com/cr-marcstevens/sha1collisiondetection.git
    branch = master

The submodule repository will be included at its commit 855827c583bc30645ba427885caa40c5b81764d2. If you git submodule update that submodule, you'll see that it fetches that commit.

Submodule path 'sha1collisiondetection': checked out '855827c583bc30645ba427885caa40c5b81764d2'

And inside that path, you can cat-file that commit.

% git cat-file -p 8558
tree c963fb3e40e0b9a031ffbab4f2f06bfbcc8527b7
parent 16033998da4b273aebd92c84b1e1b12e4aaf7009
author Michael Osipov <[email protected]> 1557389728 +0200
committer Marc Stevens <[email protected]> 1557396519 +0200

Detect endianess on HP-UX

HP-UX is not properly detected and classified as little endian. Add test macro
for HP-UX to make it big endian.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.