threads / discuss / 10063

git-cat-file "Not a valid object name"

Subject: git-cat-file "Not a valid object name"

## tl;dr

3 messages between Sep 28, 2007 and Sep 28, 2007.

replies: 2people: 3as markdown or json

Reza Roboubi· Sep 28, 2007, 22:05 UTC · lore
git-cat-file -t 9b22b50f814b22224d6f838433f1e9cd36bfc2
says: "Not a valid object name".

So what is this thing in my .git: ../.git/objects/92/9b22b50f814b22224d6f838433f1e9cd36bfc2

Thanks in advance.
Reza.
Linus Torvalds· Sep 28, 2007, 22:12 UTC · re: Reza Roboubi · lore

Re: git-cat-file "Not a valid object name"

On Fri, 28 Sep 2007, Reza Roboubi wrote:
Show 7 quoted lines
>
> git-cat-file -t 9b22b50f814b22224d6f838433f1e9cd36bfc2
> 
> says: "Not a valid object name".
> 
> So what is this thing in my .git:
> ../.git/objects/92/9b22b50f814b22224d6f838433f1e9cd36bfc2

The object name for that thing is 929b22b5... You need the two first hex digits too (which are used as the fan-out in the object directory).

		Linus
Sean· Sep 28, 2007, 22:15 UTC · re: Reza Roboubi · lore

Re: git-cat-file "Not a valid object name"

On Fri, 28 Sep 2007 15:05:25 -0700 Reza Roboubi <reza@earthdetails.com> wrote:

Show 7 quoted lines
> git-cat-file -t 9b22b50f814b22224d6f838433f1e9cd36bfc2
>
>
> says: "Not a valid object name".
> 
> So what is this thing in my .git:
> ../.git/objects/92/9b22b50f814b22224d6f838433f1e9cd36bfc2
Reza,

The first two digits of the sha1 appear before the final slash (/).. Therefore the actual object name in the case you give is 929b22b50f814b22224d6f838433f1e9cd36bfc2. So the following command should work:

$ git cat-file -t 929b22b5
Sean

← back to recent threads