From: Andy Parkins <andyparkins@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: bug: update hook failure doesn't prevent local deletion of a branch
Date: Wed, 25 Jul 2007 12:50:06 +0100 [thread overview]
Message-ID: <200707251250.08166.andyparkins@gmail.com> (raw)
Hello,
I wanted to delete a branch (let's call it "deleted-branch") from my public
repository. I ran this:
$ git push origin :deleted-branch
deleting 'refs/heads/deleted-branch'
Also local refs/remotes/up/deleted-branch
*** Update hook: aborting
error: hooks/update exited with error code 1
error: hook declined to update refs/heads/deleted-branch
ng refs/heads/deleted-branch hook declined
error: failed to push to '/path/to/git/repo.git'
Coincidentally, my update hook happened to have a bug in it that prevented me
from running the operation.
However, when I run the operation again...
$ git push origin :deleted-branch
deleting 'refs/heads/deleted-branch'
Also local refs/remotes/up/deleted-branch
error: unlink(.git/refs/remotes/up/deleted-branch) failed: No such file or
directory
error: Failed to delete
If the remote didn't get deleted, then it seems wrong that the local copy does
get deleted.
Summary: when using git-push to delete a remote branch, and that deletion is
disallowed by the update hook, the local tracking branch _is_ deleted.
Obviously, this isn't _that_ serious because it could be recovered again with
a git-fetch; but it does make some scary looking errors.
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
next reply other threads:[~2007-07-25 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 11:50 Andy Parkins [this message]
2007-07-27 4:13 ` bug: update hook failure doesn't prevent local deletion of a branch Junio C Hamano
2007-07-27 4:26 ` Shawn O. Pearce
2007-07-27 5:00 ` Junio C Hamano
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=200707251250.08166.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).