From: Mark Levedahl <mlevedahl@gmail.com>
To: Mark Levedahl <mdl123@verizon.net>
Cc: Paul Mackerras <paulus@samba.org>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] gitk - dont warn when deleting synonym for current head
Date: Sun, 12 Aug 2007 21:51:04 -0400 [thread overview]
Message-ID: <46BFB908.7050000@gmail.com> (raw)
In-Reply-To: <46BFAF8E.1000508@verizon.net>
Mark Levedahl wrote:
> current checked out branch = master
> HEAD contains ref: refs/heads/master
> foo points to the same commit as master
> I attempted to delete foo.
>
> Note: the context menu does not allow deleting the currently checked
> out branch, so the referenced check is irrelevant to that.
>
By the way, I'm not sure how gitk can usefully do the implied check
without loading the full repository DAG. The check requires finding that
the referenced commit is not reachable by anything in .git/refs/* except
the branch head in question, yet in general gitk has not explored all of
those refs, only those explicitly given on the command line (or HEAD by
default). So, unless "delete branch" is going to require a variant of
"git-rev-list --all", I think the choices are either a) do what the user
requested, or b) offer a "Are you sure you want to do this?" dialog
followed by doing what the user asked.
git-branch -d is similarly challenged: it complains unless the branch to
delete is reachable from the current HEAD, and requires -D to delete
anything else. It does not check to see if the commit is otherwise
reachable from .git/refs/*.
Mark
next prev parent reply other threads:[~2007-08-13 1:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-12 21:03 [PATCH] gitk - dont warn when deleting synonym for current head Mark Levedahl
2007-08-12 23:44 ` Paul Mackerras
2007-08-13 1:10 ` Mark Levedahl
2007-08-13 1:51 ` Mark Levedahl [this message]
2007-08-13 3:52 ` Paul Mackerras
2007-08-13 13:04 ` Mark Levedahl
2007-08-13 13:22 ` Mark Levedahl
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=46BFB908.7050000@gmail.com \
--to=mlevedahl@gmail.com \
--cc=git@vger.kernel.org \
--cc=mdl123@verizon.net \
--cc=paulus@samba.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).