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:

>  /*
> - * Return false if cannot stat a tracking branch (not exist or invalid),
> - * otherwise true.
> + * Compare a branch with its tracking branch, and save their differences
> + * (number of commits) in *num_ours and *num_theirs.
> + *
> + * Return 0 if branch has no upstream, -1 if upstream is missing or invalid,
> + * otherwise 1.
>   */

What is the difference between a branch that has no upstream and
upstream being missing?  Or between missing and invalid?

I think you are trying to say the difference between
"branch.<name>.merge is not set at all" and "branch.<name>.merge is
in the configuration, but the named upstream ref does not exist".

You are calling the latter "missing or invalid", but how does one
tell missing ones from invalid ones?  I think there isn't a
distinction, so it would be better to just say "missing" (or "gone",
which is very much more likely reason why you still have
configuration without a ref).

I am not sure it is a good idea to label "missing" as "broken" or
"invalid", but it seems that your tests, in code comments and
variable names are full of these negative connotations.

Hmph...


--
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]