git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Minor bug in git branch --set-upstream-to adding superfluous branch section to config
@ 2013-03-29 16:29 Phil Haack
  2013-03-29 17:00 ` Jeff King
  2013-03-29 17:27 ` Minor bug in git branch --set-upstream-to adding superfluous branch section to config Junio C Hamano
  0 siblings, 2 replies; 13+ messages in thread
From: Phil Haack @ 2013-03-29 16:29 UTC (permalink / raw)
  To: git

Hello there! Please /cc me with responses as I'm not on the mailing list.

I'm using git version 1.8.1.msysgit.1 and I ran into a very minor issue. It
doesn't actually seem to affect operations, but I thought I'd report it in case
someone felt it was worth cleaning up.

If you run the following set of commands:

    git checkout -b some-branch
    git push origin some-branch
    git branch --set-upstream-to origin/some-branch
    git branch --unset-upstream some-branch
    git branch --set-upstream-to origin/some-branch

You get the following result in the .git\config file

    [branch "some-branch"]
    [branch "some-branch"]
        remote = origin
        merge = refs/heads/some-branch

My expectation is that the very last call to: git branch --set-upstream-to
would not add a new config section, but would instead insert this information
into the existing [branch "some-branch"].

In any case, from what I understand the current behavior is technically valid
and I haven't encountered any adverse effects. It was just something I noticed
while testing.

Thanks!

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-03-28 17:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-29 16:29 Minor bug in git branch --set-upstream-to adding superfluous branch section to config Phil Haack
2013-03-29 17:00 ` Jeff King
2013-03-29 17:20   ` Thomas Rast
2013-03-29 17:23     ` Jeff King
2013-03-29 17:50       ` [PATCH] t1300: document some aesthetic failures of the config editor Jeff King
2013-03-29 18:51         ` Junio C Hamano
2013-03-29 19:51           ` Jeff King
2013-03-29 20:35             ` Junio C Hamano
2013-03-30  0:21               ` Jeff King
2018-03-28 16:33             ` Johannes Schindelin
2018-03-28 17:59               ` Jeff King
2013-03-29 20:00           ` Junio C Hamano
2013-03-29 17:27 ` Minor bug in git branch --set-upstream-to adding superfluous branch section to config Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).