git gc destroys autostash

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

 



Running git gc --prune=now during rebase with autostash deletes the
autostash object, and it cannot be recovered when the rebase ends.

Example:

#!/bin/sh

git init
echo 1 > foo; git add foo; git commit -m 'Initial commit'
echo 2 > foo; git add foo; git commit -m 'Second commit'
echo 3 > foo; git rebase -i --autostash HEAD^
# Choose edit
git gc --prune=now
git rebase --continue
# fatal: '3b88163a1bff3859a005554c168d94e5357ee45b' is not a stash-like commit
# error: cannot store 3b88163a1bff3859a005554c168d94e5357ee45b
# Successfully rebased and updated refs/heads/master.

Thanks,
- Orgad




[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