All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Brian Gesiak <modocache@gmail.com>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>, git@vger.kernel.org
Subject: Re: [PATCH 1/2] t3200-branch: test setting branch as own upstream
Date: Fri, 28 Feb 2014 08:03:41 -0500	[thread overview]
Message-ID: <20140228130340.GB23448@sigill.intra.peff.net> (raw)
In-Reply-To: <CAN7MxmVxYhF1VXWZNAXyfF8iBNQaqqwoyjmDAP_9_bc5NUUU6A@mail.gmail.com>

On Fri, Feb 28, 2014 at 08:16:13PM +0900, Brian Gesiak wrote:

> > I just don't want to regress somebody else's workflow due
> > to my lack of imagination.
> 
> This makes a lot of sense to me, although as-is the function emits a
> warning and returns immediately (although with a successful status
> code), so I'm also stumped as to what kind of workflow this would be
> included in.

I'm cc-ing Matthieu, who wrote 85e2233, which introduces the check. Its
commit message says:

  branch: warn and refuse to set a branch as a tracking branch of
  itself.

  Previous patch allows commands like "git branch --set-upstream foo
  foo", which doesn't make much sense. Warn the user and don't change
  the configuration in this case. Don't die to let the caller finish its
  job in such case.

For those just joining us, we are focused on the final statement, and
deciding whether we should die() in this case. But I am not clear what
job it would want to be finishing (creating the branch, I guess, but you
cannot be doing anything useful, since by definition the branch already
exists and you are not changing its tip). There wasn't any relevant
discussion on the list[1]. Matthieu, can you remember anything else that
led to that decision?

> In any case, if the jury's out on this one, I suppose the two patches
> I submitted are good to merge? Part of me thinks the bump from warning
> to error belongs in its own patch anyway.

Yeah, it should definitely be a separate patch on top.

-Peff

[1] Threads are:

      http://thread.gmane.org/gmane.comp.version-control.git/137297/focus=137299

    and

      http://thread.gmane.org/gmane.comp.version-control.git/137401/focus=137403

    but the discussion focused on the first part of the series.

  reply	other threads:[~2014-02-28 13:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28  3:04 [PATCH 1/2] t3200-branch: test setting branch as own upstream Brian Gesiak
2014-02-28  3:04 ` [PATCH 2/2] branch: use skip_prefix Brian Gesiak
2014-02-28  5:46   ` Jeff King
2014-03-03 19:54     ` Junio C Hamano
2014-02-28  5:37 ` [PATCH 1/2] t3200-branch: test setting branch as own upstream Jeff King
2014-02-28  6:17   ` Brian Gesiak
2014-02-28  6:27     ` Jeff King
2014-02-28 22:15       ` brian m. carlson
2014-02-28  6:55   ` Johannes Sixt
2014-02-28  7:14     ` Jeff King
2014-02-28  7:26       ` Jeff King
2014-02-28  7:28         ` Brian Gesiak
2014-02-28  8:37           ` Jeff King
2014-02-28 10:44             ` Brian Gesiak
2014-02-28 10:59               ` Jeff King
2014-02-28 11:16                 ` Brian Gesiak
2014-02-28 13:03                   ` Jeff King [this message]
2014-02-28 14:57                     ` Matthieu Moy
2014-03-01 12:19                       ` [PATCH v2] branch: die when " Brian Gesiak
2014-03-01 12:23                         ` [PATCH 3/3] " Brian Gesiak
2014-03-01 12:26                           ` Brian Gesiak
2014-02-28  7:40       ` [PATCH 1/2] t3200-branch: test " Johannes Sixt

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=20140228130340.GB23448@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=modocache@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.