Git development
 help / color / mirror / Atom feed
From: "Christian Jaeger" <pflanze@gmx.ch>
To: git@vger.kernel.org
Subject: [BUG(s)?] dangling symref breaks filter-branch
Date: Sat, 18 Jul 2009 04:11:44 +0200	[thread overview]
Message-ID: <20090718021144.162050@gmx.net> (raw)

Hello

$ git branch -a
  master
* stablepatches
  work
  remotes/origin/origin/master
  remotes/origin/stablepatches
  remotes/origin/work

$ git filter-branch --env-filter '..somecode..'
fatal: missing object 0000000000000000000000000000000000000000 for refs/remotes/origin/HEAD

Same thing happened with whatever additional argument (rev-list) I would give to git filter-branch.

When I cloned this repo and run the filter-branch in the clone, it worked.

git fsck --all on the faulty repo reported nothing but a couple dangling objects.

I used git version 1.6.3.3 and then 1.6.4.rc1 (same problem). Further digging has revealed:

$ cat .git/refs/remotes/origin/HEAD
ref: refs/remotes/origin/master
$ cat .git/refs/remotes/origin/master
cat: .git/refs/remotes/origin/master: No such file or directory

$ git rev-parse refs/remotes/origin/HEAD
said "dangling symref refs/remotes/origin/HEAD."

$ rm .git/refs/remotes/origin/HEAD
has made filter-branch work again.


So, issue one I'm wondering about: how comes I had this dangling symbolic ref? If it makes git tools break, shouldn't those refs be updated in a safe way (so that interruption can't leave those behind), or maybe should the tools be fixed for not handling them correctly.

Issue two (maybe not an issue) is why git filter-branch thought it should look at refs/remotes/origin/HEAD at all--I didn't tell it to, after all (right? I've spent time going through my config because I thought it would be taking this idea from there somehow, but couldn't see anything obvious).

(Issue three, maybe, why fsck didn't report any problem.)

Christian.
Note: I'm not subscribed to the ml currently.

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

             reply	other threads:[~2009-07-18  2:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-18  2:11 Christian Jaeger [this message]
2009-07-18  5:28 ` [BUG(s)?] dangling symref breaks filter-branch Björn Steinbrink

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090718021144.162050@gmx.net \
    --to=pflanze@gmx.ch \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox