From: Heiko Voigt <hvoigt@hvoigt.net>
To: Jeff King <peff@peff.net>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
git@vger.kernel.org, Pat Thoyts <patthoyts@googlemail.com>
Subject: Re: Re: Re: [PATCH] git-gui: give more advice when detaching HEAD
Date: Thu, 17 Feb 2011 18:27:21 +0100 [thread overview]
Message-ID: <20110217172720.GA91738@book.hvoigt.net> (raw)
In-Reply-To: <20110216034606.GA2414@sigill.intra.peff.net>
Hi,
On Tue, Feb 15, 2011 at 10:46:06PM -0500, Jeff King wrote:
> On Tue, Feb 15, 2011 at 08:16:21PM +0100, Heiko Voigt wrote:
>
> > > It seems a little heavy-handed to have a dialog pop up for each commit.
> > > It's not actually dangerous to create a commit on a detached HEAD; it's
> > > just dangerous to _leave_ without referencing your new commits.
> >
> > Hmm, how about adding a checkbox:
> >
> > [ ] Do not ask again
> >
> > In my experience anything other than a popup will be overseen so I would
> > suggest doing it at least once to prepare the user for the possible
> > consequences.
>
> Yeah, that's much better IMHO because at least clueful people can
> dismiss it after the first time.
I tried to implement such a dialog yesterday. Unfortunately my tcl/tk
fu seems not sufficient enough. I managed to create the dialog but did
not get the results which button was clicked. It has something to do
with the scope of variables in tcl. Pat you would probably be able to
fix this. I can send you the code if you are interested?
> > > I do think a pop-up is appropriate when you try to check something else
> > > out, and commits you have made on the detached HEAD are about to become
> > > unreferenced. But this is something even the CLI doesn't do, so it would
> > > make sense to see how the check is implemented there first before doing
> > > anything in git-gui.
> >
> > From what I read in this thread it currently seems to be not so easy to
> > precisely find out whether some commit is referenced. (If we care about
> > stuff outside of remotes, heads and tags). But maybe we do not need
> > that for the GUI.
>
> Yeah, I think there is still some question about how it should happen,
> and any check in the gui should probably be the same as in the cli. But
> from the rest of what you say, that shouldn't impact whether a
> per-commit warning is worth doing.
Will someone be working on this? Otherwise: Implementing the previously
suggested solution is quite straightforward for git-gui. I could
implement that check in git-gui first and once the CLI has some
mechanism for this check we could switch to that.
Cheers Heiko
next prev parent reply other threads:[~2011-02-17 17:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-12 7:05 [PATCH] git-gui: give more advice when detaching HEAD Jeff King
2011-02-12 7:42 ` Junio C Hamano
2011-02-12 8:04 ` Jeff King
2011-02-12 8:17 ` Junio C Hamano
2011-02-12 8:21 ` Jeff King
2011-02-17 23:13 ` Junio C Hamano
2011-02-12 8:42 ` Junio C Hamano
2011-02-13 0:05 ` Sverre Rabbelier
2011-02-13 9:22 ` Johannes Sixt
2011-02-13 23:10 ` Junio C Hamano
2011-02-13 12:31 ` Heiko Voigt
2011-02-15 6:39 ` Jeff King
2011-02-15 19:16 ` Heiko Voigt
2011-02-15 19:48 ` Pat Thoyts
2011-02-16 3:50 ` Jeff King
2011-02-17 17:38 ` Heiko Voigt
2011-02-16 3:46 ` Jeff King
2011-02-17 17:27 ` Heiko Voigt [this message]
[not found] ` <5828845.77740.1297797387140.JavaMail.trustmail@mail1.terreactive.ch>
2011-02-16 16:11 ` Victor Engmark
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=20110217172720.GA91738@book.hvoigt.net \
--to=hvoigt@hvoigt.net \
--cc=git@vger.kernel.org \
--cc=patthoyts@googlemail.com \
--cc=peff@peff.net \
--cc=spearce@spearce.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).