From: Christian Couder <chriscool@tuxfamily.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Junio Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Remove branch by putting a null sha1 into the ref file.
Date: Wed, 20 Sep 2006 04:56:24 +0200 [thread overview]
Message-ID: <200609200456.24714.chriscool@tuxfamily.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0609180926590.4388@g5.osdl.org>
Linus Torvalds wrote:
> On Mon, 18 Sep 2006, Christian Couder wrote:
> > With the new packed ref file format from Linus, this should be
> > the new way to remove a branch.
>
> Well, it's not really sufficient.
>
> Somebody should add this test-case
>
> git branch test
> git branch -d test
> git branch test/first
>
> which should work.
>
> It's entirely possible that the proper way to do branch deletion with
> packed branches is to simply re-pack without the old branch, rather than
> the negative branch model.
Yes, and anyway git-branch should probably use some other git command for
this, like "git-update-ref <ref> 0" or "git-update-ref --delete <ref>".
> I couldn't really decide.
>
> However: this part is definitely correct, considering that we allow the
> null sha1 in other places.
>
> > "refs.c" is fixed so that a null sha1 for a deleted branch does
> > not result in "refs/head/deleted does not point to a valid
> > commit object!" messages.
Well, it was in one of your patch already but I had not seen it. And I
wrongly assumed that your patches were all merged into next but this one
was not.
> And this last part is conceptually ok, but I think the implementaion is
> wrong:
> > "t/t3200-branch.sh" is fixed so that it uses git-show-ref
> > instead of checking that the ref does not exist when a branch
> > is deleted.
>
> I think you should change the
>
> ! git-show-ref --verify --quiet -- "refs/heads/d/e/f" &&
>
> into
>
> git-show-ref --verify --quiet -- "refs/heads/d/e/f" ||
>
> instead, no?
It seems Junio found it ok, and I still think it is ok, but my description
of the change is bad.
Maybe git-show-ref should have an option to check that a ref does not exist
for example "git-show-ref --inexistant --quiet -- "refs/heads/d/e/f".
Thanks for your comments.
Christian.
next prev parent reply other threads:[~2006-09-20 2:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-18 4:54 [PATCH] Remove branch by putting a null sha1 into the ref file Christian Couder
2006-09-18 5:47 ` Junio C Hamano
2006-09-18 16:31 ` Linus Torvalds
2006-09-18 18:43 ` Junio C Hamano
2006-09-20 2:56 ` Christian Couder [this message]
2006-09-22 22:09 ` Junio C Hamano
2006-09-23 4:45 ` Christian Couder
2006-09-23 8:04 ` Junio C Hamano
2006-09-23 11:22 ` Christian Couder
2006-09-23 21:49 ` Junio C Hamano
2006-09-24 4:45 ` Christian Couder
2006-09-25 9:26 ` On ref locking Junio C Hamano
2006-09-25 17:05 ` Daniel Barkalow
2006-09-26 4:11 ` Junio C Hamano
2006-09-26 4:13 ` [PATCH 1/3] Clean-up lock-ref implementation Junio C Hamano
2006-09-26 4:13 ` [PATCH 2/3] update-ref: -d flag and ref creation safety Junio C Hamano
2006-09-26 18:05 ` [PATCH 3/3] update a few Porcelain-ish for ref lock safety Junio C Hamano
2006-09-26 18:08 ` Andy Whitcroft
2006-09-27 7:25 ` 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=200609200456.24714.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=torvalds@osdl.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).