Re: [PATCH 3/3] remote: introduce and fill branch->pushremote

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

 



Jeff King wrote:
>   2. If the current branch has a branch.*.pushremote set, but we want to
>      know where a _different_ branch would be pushed, we have no way to
>      access remote.pushdefault (it gets overwritten in the hunk above).
>
>      @{upstream} does not have this problem, because it is _only_
>      defined if branch.*.remote is set. There is no such thing as
>      defaulting to a "remote.default" (or "origin") there, and we never
>      need to look at default_remote_name.
>
>      For @{publish}, though, I think we will want that default. The
>      common config will be to simply set "remote.pushdefault", rather
>      than setting up "branch.*.pushremote" for each branch, and we would
>      want @{publish} to handle that properly.

Not sure I understand what the problem is. Let's say we have two
branches: "master", and "side" with remote.pushdefault = ram,
branch.*.remote = origin, and branch.side.pushremote = peff. Now, when
I query master's pushremote, I get "ram" and when I query side's
pushremote, I get "peff"; all the logic for falling-back from
branch.*.pushremote to remote.pushdefault to branch.*.remote is in
branch_get(), so I need to do nothing extra on the caller-side. From
the caller's perspective, why does it matter if the pushremote of a
particular branch is due to branch.*.pushremote or remote.pushdefault?
--
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]