Bug 483546 - git-repack fails if tree created with old git-init
Summary: git-repack fails if tree created with old git-init
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: git
Version: 10
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Todd Zullinger
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-02 11:08 UTC by nvwarr
Modified: 2013-01-10 10:30 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-02-19 05:01:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.