[Bug 1347814] [NEW] git-gc can damage a repository

Sworddragon 1347814 at bugs.launchpad.net
Wed Jul 23 16:52:20 UTC 2014


Public bug reported:

I'm using Ubuntu 14.10 dev with git 1:2.0.1-1 and if git-gc hasn't full
write-access to a repository it can damage it. Getting such a permission
state for a git repository isn't even unlikely if it was optimized in a
sudo environment before. Here is an example output:

sworddragon at ubuntu:~/.git/tvoip$ sudo git gc --aggressive --prune=now
Counting objects: 1250, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (1220/1220), done.
Writing objects: 100% (1250/1250), done.
Total 1250 (delta 944), reused 295 (delta 0)
sworddragon at ubuntu:~/.git/tvoip$ git gc --aggressive --prune=now
fatal: internal error: packed-ref cache cleared while locked
error: failed to run pack-refs

** Affects: git (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to git in Ubuntu.
https://bugs.launchpad.net/bugs/1347814

Title:
  git-gc can damage a repository

Status in “git” package in Ubuntu:
  New

Bug description:
  I'm using Ubuntu 14.10 dev with git 1:2.0.1-1 and if git-gc hasn't
  full write-access to a repository it can damage it. Getting such a
  permission state for a git repository isn't even unlikely if it was
  optimized in a sudo environment before. Here is an example output:

  sworddragon at ubuntu:~/.git/tvoip$ sudo git gc --aggressive --prune=now
  Counting objects: 1250, done.
  Delta compression using up to 6 threads.
  Compressing objects: 100% (1220/1220), done.
  Writing objects: 100% (1250/1250), done.
  Total 1250 (delta 944), reused 295 (delta 0)
  sworddragon at ubuntu:~/.git/tvoip$ git gc --aggressive --prune=now
  fatal: internal error: packed-ref cache cleared while locked
  error: failed to run pack-refs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/git/+bug/1347814/+subscriptions



More information about the foundations-bugs mailing list