From: Jeff King <peff@peff.net>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
git@vger.kernel.org, Pat Thoyts <patthoyts@googlemail.com>
Subject: Re: [PATCH] git-gui: give more advice when detaching HEAD
Date: Tue, 15 Feb 2011 01:39:03 -0500 [thread overview]
Message-ID: <20110215063903.GA28634@sigill.intra.peff.net> (raw)
In-Reply-To: <20110213123151.GA31375@book.hvoigt.net>
On Sun, Feb 13, 2011 at 01:31:52PM +0100, Heiko Voigt wrote:
> On Sat, Feb 12, 2011 at 02:05:38AM -0500, Jeff King wrote:
> > 1. Give some indication or warning during commit that you're in a
> > detached state. The CLI template says "You are not on any branch"
> > when editing the commit message, and mentions "detached HEAD" as
> > the branch in the post-commit summary. As far as I can tell,
> > git-gui says nothing at all.
>
> How about something like this:
> [...]
> Subject: [PATCH] git-gui: warn when trying to commit on a detached head
>
> The commandline is already warning when checking out a detached head.
> Since the only thing thats potentially dangerous is to create commits
> on a detached head lets warn in case the user is about to do that.
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.
So I think for making commits, something informational that doesn't
require a click-through would be the more appropriate level (similar to
what the CLI does; it just mentions it in the commit template). I guess
there isn't a commit template in the same way for git gui; instead, it
is always showing you the current state. And indeed, it does switch from
"Current Branch: master" to "Current Branch: HEAD" when you are on a
detached head. Maybe we should beef that up a bit to "You are not on any
branch." or something that is more self-explanatory. I dunno. I am just
guessing here about what users would want.
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.
-Peff
next prev parent reply other threads:[~2011-02-15 6:39 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 [this message]
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
[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=20110215063903.GA28634@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
--cc=patthoyts@googlemail.com \
--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).