Opened 10 years ago

Closed 8 years ago

Last modified 8 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 by Silvan Scherrer, 10 years ago

Component: *nonegit

comment:2 by Silvan Scherrer, 9 years ago

Milestone: dev tools
Severity: low

comment:3 by dmik, 8 years ago

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 by dmik, 8 years ago

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 by Steven Levine, 8 years ago

FTR, this works for me too after updating less to 4.81.

Version 0, edited 8 years ago by Steven Levine (next)
Note: See TracTickets for help on using tickets.