git gc fails with "unable to resolve reference" for worktree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# Steps to reproduce (in terms of terminal commands)

   $ mkdir foo
   $ cd foo
   $ git init
   Initialized empty Git repository in /tmp/foo/.git/
   $ echo hello > testfile
   $ git add testfile && git commit -m "my commit1"
   [master (root-commit) d5f0b47] my commit1
   1 file changed, 1 insertion(+)
   create mode 100644 testfile
   $ git checkout -b bar
   Switched to a new branch 'bar'
   $ git worktree add ../bar\ \(worktree\) master
   Preparing worktree (checking out 'master')
   HEAD is now at d5f0b47 my commit1
   $ git gc
error: cannot lock ref 'worktrees/bar (worktree)/HEAD': unable to resolve reference 'worktrees/bar (worktree)/HEAD': Invalid argument
   fatal: failed to run reflog

# Expected

No errors

# Actual

error: cannot lock ref 'worktrees/bar (worktree)/HEAD': unable to resolve reference 'worktrees/bar (worktree)/HEAD': Invalid argument





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux