Opened 9 years ago

Closed 7 years ago

Last modified 7 years ago

#56 closed defect (worksforme)

git 2.0.0 gc command destroys repositories

Reported by: Steven Levine Owned by:
Priority: Feedback pending Milestone: dev tools
Component: git Version:
Severity: low Keywords: git gc
Cc:

Description

This is somewhat related to #53.

There appears to be a problem in start_command() (run-command.c)which results in the stdin of the forked process not getting properly connected the stdout of the parent process.

In the case of git gc, this results in repack not receiving an object list on stdin and producing an empty pack file. The only recourse in this case is to restore the repo from a backup because the loose objects have been deleted.

Change History (5)

comment:1 Changed 9 years ago by Silvan Scherrer

Component: *nonegit

comment:2 Changed 9 years ago by Silvan Scherrer

Milestone: dev tools
Severity: low

comment:3 Changed 7 years ago by dmik

Priority: majorFeedack pending

At least with git 2.11.0 (the latest trunk) rebuilt against LIBCx 0.4 it works. My test case is as follows:

  • create a repo
  • commit a file
  • re-commit it with --amend (to have a lost commit created)
  • run git gc --prune

I'm not sure if it triggered your use case as it always says Nothing new to pack. So it's best if you provide a ZIP with the test repo that fails for you so that I could make sure it works (or not) with the latest git.

comment:4 Changed 7 years ago by dmik

Resolution: worksforme
Status: newclosed

Steven, the new git RPM 2.11.0 is online. Please recheck this. Feel free to reopen If it still gives you any problem but please provide a ZIP with a test repo in such a case so that I could reproduce it.

comment:5 Changed 7 years ago by Steven Levine

FTR, this works for me too after updating git to 2.11.0-2 and less to 4.81.

Last edited 7 years ago by Steven Levine (previous) (diff)
Note: See TracTickets for help on using tickets.