Re: [PATCH v6 2/3] branch: report invalid tracking branch as broken

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

 



Jiang Xin <worldhello.net@xxxxxxxxx> writes:

> If a branch has been set to track a upstream, but the upstream branch
> is missing or invalid, the tracking info is silently ignored in the
> output of some commands such as "git branch -vv" and "git status",
> as if there were no such tracking settings.
>
> Junio suggested broken upstream should be reported [1]. E.g.
>
>     $ git branch -v -v
>       master    e67ac84 initial
>     * topic     3fc0f2a [topicbase: broken] topic

I'd assume this is s/broken/gone/ to match what the rest of the log
message says?

>     $ git status
>     # On branch topic
>     # Your branch is based on a broken ref 'topicbase'.
>     #   (use "git branch --unset-upstream" to fixup)
>     ...
>
>     $ git status -b -s
>     ## topic...topicbase [broken]
>     ...
>
> In order to do like that, we need to distinguish these three cases
> (i.e. no tracking, with configured but no longer valid tracking, and
> with tracking) in function stat_tracking_info(). So the refactored
> function stat_tracking_info() has three return values: -1 (with "gone"
> base), 0 (no base), and 1 (with base).
--
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]