threads / discuss / 2282

Another problem with not existing directories

Subject: Another problem with not existing directories

## tl;dr

5 messages between Oct 31, 2005 and Oct 31, 2005.

replies: 4people: 3as markdown or json

Marcel Holtmann· Oct 31, 2005, 17:20 UTC · lore
Hi guys,

I think there exists another problem with git-unpack-objects if the sub-directory in "objects" doesn't exists.

# cg-push master
updating 'refs/heads/master'
  from 581c1b14394aee60aff46ea67d05483261ed6527
  to   197c190b0b00689074c03fc3ebcfa114dbed1d73
Packing 37 objects
Unpacking 37 objects
unable to write sha1 filename ./objects/dc/59cd72edc7bc6169c2c9c073c86483f9318e7c: No such file or directoryfatal: failed to write object
fatal: git-unpack-objects exited with error code 128

In this case the directory "objects/dc" doesn't exists. Creating it fixes the problem, but I think they should be created on demand.

Regards
Marcel
Linus Torvalds· Oct 31, 2005, 17:35 UTC · re: Marcel Holtmann · lore

Re: Another problem with not existing directories

On Mon, 31 Oct 2005, Marcel Holtmann wrote:
> 
> I think there exists another problem with git-unpack-objects if the
> sub-directory in "objects" doesn't exists.
Are you sure you just don't have an old version of git on the other end?

As far as I know, git-unpack-objects will use the bog-standard "write_sha1_file()" which already knows how to create missing subdirectories.

This _sounds_ like the other end has two different versions of git, and when you "push" to it, it executes an old version, but then you have a newer version somewhere that created the sparsely-populated object directory in the first place.

This happens (for example) if you have installed an older version of git through an rpm (say, the one that comes from Fedora Core: 0.99.8) and you have that in /usr/bin, but then you have a newer version that you've built and installed yourself in your ~/bin/ directory.

If you have your PATH being set in your .bashrc, it won't trigger with a non-interactive login, so you'll use the /usr/bin/ version when pushing, but then when you log in interactively to a shell, you'll use the ~/bin one (or the other way around, I'm easily confused by the bash config file rules ;)

		Linus
Marcel Holtmann· Oct 31, 2005, 17:46 UTC · re: Linus Torvalds · lore

Re: Another problem with not existing directories

Hi Linus,
> > I think there exists another problem with git-unpack-objects if the
> > sub-directory in "objects" doesn't exists.
> 
> Are you sure you just don't have an old version of git on the other end?

this might be possible, but then it is an old git on kernel.org. I never installed any git by myself on it.

Regards
Marcel
Junio C Hamano· Oct 31, 2005, 18:43 UTC · re: Marcel Holtmann · lore

Re: Another problem with not existing directories

Marcel Holtmann <marcel@holtmann.org> writes:
>> Are you sure you just don't have an old version of git on the other end?
>
> this might be possible, but then it is an old git on kernel.org. I never
> installed any git by myself on it.

I just tried this myself; master.kernel.org seems to have 0.99.8f in /usr/bin/, which explains this symptom.

Marcel Holtmann· Oct 31, 2005, 21:38 UTC · re: Junio C Hamano · lore

Re: Another problem with not existing directories

Hi Junio,
Show 7 quoted lines
> >> Are you sure you just don't have an old version of git on the other end?
> >
> > this might be possible, but then it is an old git on kernel.org. I never
> > installed any git by myself on it.
> 
> I just tried this myself; master.kernel.org seems to have
> 0.99.8f in /usr/bin/, which explains this symptom.

so as soon as kernel.org switches to 0.99.9 everything should be fine again. That's great.

Regards
Marcel

← back to recent threads