Thread (6 messages) flat view 6 messages, 2 authors, 2016-06-15

Re: Re: [PATCH] git-gui: give more advice when detaching HEAD

From: Jeff King <hidden>
Date: 2016-06-15 22:50:34

On Tue, Feb 15, 2011 at 08:16:21PM +0100, Heiko Voigt wrote:
quoted
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.
IMO such a message is a good thing for the GUI regardless whether we
implement the leaving detached HEAD state warning. First I think a
typical GUI user does not commit on a detached head that often since
there is currently no way to use these commits from the GUI (e.g.
format-patch, rebase, ...).
Fair enough. I really have no idea what sorts of things gui users do, or
how they perceive the system.
Second because a detached head is very practical for testing work on a
remote branch the message box would remind most users to switch to
their development branch first. If they only get that message after a
series of commits it might become a hassle for them to get these
commits onto another branch (remember no format-patch or rebase
currently).
Good point.
quoted
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.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help