All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nanako Shiraishi <nanako3@lavabit.com>
Cc: Sitaram Chamarty <sitaramc@gmail.com>,
	git@vger.kernel.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] gitk: disable checkout of remote branch
Date: Sun, 21 Jun 2009 16:27:13 -0700	[thread overview]
Message-ID: <7vtz29p3qm.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20090622063405.6117@nanako3.lavabit.com> (Nanako Shiraishi's message of "Mon\, 22 Jun 2009 06\:34\:05 +0900")

Nanako Shiraishi <nanako3@lavabit.com> writes:

> Quoting Junio C Hamano <gitster@pobox.com>:
>
>> Sitaram Chamarty <sitaramc@gmail.com> writes:
>>
>>> At the command line, this gives you a detailed warning message, but the
>>> GUI currently allows it without any fuss.
>>>
>>> Since the GUI is often used by people much less familiar with git, it
>>> seems reasonable to make the GUI more restrictive than the command line,
>>> not less.
>>> ...
>>> This patch helps me a lot.
>>
>> The patch seems to disable checkout unconditionally, but it at least needs
>> an "expert mode" switch to bypass the patch's logic, or (better yet) a
>> "training wheel" switch for you to set in repositories of the people you
>> manage.
>
> It will be more helpful if it checked out a new local branch that tracks
> the remote branch, instead of refusing what the user asked to do. It may
> need a new dialog that asks to confirm (and allows the user to change)
> the name of the new branch.

Heh, stop, step back and think a bit.  I admit that it wasn't just you; we
were both blind.

If we unconditionally disable "check out this branch" from the context
sensitive menu for the tip of a remote tracking branch, I do not think we
lose anything.  If one wants to start a new local branch from there, one
can use the context sensitive menu for an arbitrary commit (rowmenu) and
say "Create new branch".

If we wanted users of gitk to use it to detach HEAD, the current UI is not
a good way to do so anyway --- it only allows detaching the tip of remote
tracking branches and not an arbitrary commit.

	Side note.  I am not arguing it is a good idea.  I am only saying
	that if it were a good idea, such an action should be in rowmenu
	that applies to any commit, not headmenu that applies only to the
	tips of refs. 

So I retract my earlier objection entirely.  I do not think the feature
Sitaram is disabling was meant to allow detaching HEAD at all and it can
be safely disabled for remote tracking branches to make the GUI experience
safer.

  reply	other threads:[~2009-06-21 23:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-20  6:48 Please pull gitk master branch Paul Mackerras
2009-06-21  9:11 ` [PATCH] gitk: disable checkout of remote branch Sitaram Chamarty
2009-06-21  9:22   ` Junio C Hamano
2009-06-21 14:20     ` Sitaram Chamarty
2009-06-21 21:34     ` Nanako Shiraishi
2009-06-21 23:27       ` Junio C Hamano [this message]
2009-06-22  1:59         ` Sitaram Chamarty
2009-06-22  3:42         ` Sitaram Chamarty
2009-06-21  9:40 ` Please pull gitk master branch Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2009-11-03 16:00 [PATCH] gitk: disable checkout of remote branch Sitaram Chamarty
2009-11-03 16:07 ` Sverre Rabbelier
2009-11-04  0:48   ` Tim Mazid
2009-11-04  1:58     ` Sitaram Chamarty
2009-11-04  6:17       ` Tim Mazid
2009-11-04  6:41         ` Sverre Rabbelier
2009-11-04  7:27           ` Jeff King
2009-11-04  9:08             ` Tim Mazid
2009-11-04 16:46               ` Sitaram Chamarty
2009-11-04 18:03             ` Junio C Hamano
2009-11-05  7:48               ` Jeff King
2009-11-06  0:45                 ` Junio C Hamano
2009-11-06  8:30                   ` Sverre Rabbelier
2009-11-14 11:14 ` Paul Mackerras
2009-06-05 15:21 preventing checking out remote branch in gitk Sitaram Chamarty
2009-06-06  4:06 ` [PATCH] gitk: disable checkout of remote branch Sitaram Chamarty

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=7vtz29p3qm.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=nanako3@lavabit.com \
    --cc=paulus@samba.org \
    --cc=sitaramc@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.