git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: Matthieu Moy <Matthieu.Moy@imag.fr>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH 0/2] Make it easy to use branch --track on existing branch
Date: Sun, 17 Jan 2010 16:40:31 +0200	[thread overview]
Message-ID: <20100117144031.GA20335@Knoppix> (raw)
In-Reply-To: <1263737212-8101-1-git-send-email-Matthieu.Moy@imag.fr>

On Sun, Jan 17, 2010 at 03:06:50PM +0100, Matthieu Moy wrote:
> 
> The first patch makes it possible to use branch --track on an existing
> branch (checked-out or not, regardless of -f), and the second warns on
> a newly introduced irrelevant case.

Yay. This is one of smaller entries from my todo list (the remaining
entry that's small enough to still make it into 1.7 is command to
set URL remote points to[*]).

But If I read the patch correctly, you can't just arbitrarily set the
tracking branch since the IDs must match. So if somebody screws the
ref creation so that it lacks upstream data, then both local and upstream
change. Push will fail. Pull will fail. And now neither checkout --track
(due to same-hash check) nor push --set-upstream (due to pushed or up to
date) help.

[*] Yes, I know you can edit .git/config, but I would want "official sounding"
(read: git remote subcommand) command to edit it (and no, delete & recreate
doesn't do the right thing).

-Ilari

  parent reply	other threads:[~2010-01-17 14:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-17 14:06 [PATCH 0/2] Make it easy to use branch --track on existing branch Matthieu Moy
2010-01-17 14:06 ` [PATCH 1/2] branch: allow creating a branch with same name and same starting point Matthieu Moy
2010-01-17 19:38   ` Junio C Hamano
2010-01-17 14:06 ` [PATCH 2/2] branch: warn and refuse to set a branch as a tracking branch of itself Matthieu Moy
2010-01-17 14:40 ` Ilari Liusvaara [this message]
2010-01-17 14:53   ` [PATCH 0/2] Make it easy to use branch --track on existing branch Matthieu Moy
2010-01-17 15:29     ` Ilari Liusvaara

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=20100117144031.GA20335@Knoppix \
    --to=ilari.liusvaara@elisanet.fi \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 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).