Bug 483546

Summary: git-repack fails if tree created with old git-init
Product: [Fedora] Fedora Reporter: nvwarr
Component: gitAssignee: Todd Zullinger <tmz>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 10CC: bkearney, chrisw, jwboyer, tmz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-19 05:01:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description nvwarr 2009-02-02 11:08:08 UTC
Description of problem:

git-repack (or git-gc) fails with:

fatal: Unable to create temporary file: No such file or directory
error: failed to run repack

on older git trees.

Version-Release number of selected component (if applicable):

1.6.0.6 1.fc10

How reproducible:

Always

Steps to Reproduce:
1. Using a git tree I had not looked at in a while
2. git-gc or git-repack
  
Actual results:

Fails with the above message.

Expected results:

Should repack.

Additional info:

After running:

mkdir .git/objects/pack

the problem goes away. New git trees already have this directory, which is created by git-init now, but it seems this was not always the case.

As the fix is trivial once you know it, it probably isn't important to fix this issue, but I thought it might be useful to someone to have the error and the fix posted somewhere. So feel free to close this bug straight away.

Comment 1 Todd Zullinger 2009-02-19 04:14:38 UTC
Do you know about how old the git version was that created a repo without the pack dir?  It may well be a trivial fix.  If the git version you created the repos with was not ancient, it might be good to report this upstream to avoid biting others.

Comment 2 Todd Zullinger 2009-02-19 05:01:18 UTC
Well, I should have procrastinated a bit more.  Junio just posted a patch¹ to the git list to fix this problem.  So let's close this out, as one way or another, it will be fixed upstream soon. :)

¹ http://article.gmane.org/gmane.comp.version-control.git/110621