Minor bug in git branch --set-upstream-to adding superfluous branch section to config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]