Subject: Re: [PATCH 0/2] Make it easy to use branch --track on existing branch

From: Ilari Liusvaara <[email-masked]>
Date: Sun, 17 Jan 2010 16:40:31 +0200

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