Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:26

Possibly related (same subject, not in this thread)

Jiang Xin [off-list ref] 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...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help