Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 0/3] "git name-rev --weight"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:36

"Philip Oakley" [off-list ref] writes:
Is "--weight" the right term to use for the user (cli) interface?
Wouldn't '--oldest' (or similar) be a better statement of what is
desired (absent clock skew).

While 'weight' may be a good internal technical description it didn't
convey to me what was being sought (maybe -- deepest'?).
I agree with you that weight represents what it internally does.  I
however think that "oldest" is not quite good, as it still leaves
the source of possible confusion.  It has at least 3 (or 4,
depending on how you count) possible meanings.

 - Is it the one with the oldest timestamp (and if so, do we use the
   committer date, or do we use the tagger date that may be much
   newer than the committer date)?

 - Is it the one with its longest path down to the root is the
   shortest (i.e. with smallest generation number)?

 - Is it the one with the smallest number of ancestor commits?

For the purpose of "oldest tag that contains this commit", I think
the last one would give the most intuitive answer, but depending on
your use case, you may want to enhance the command to support other
definition of "oldest"; it does not feel quite right to have this
particular definition (the last one) squat on the generic "--oldest"
name.

We could punt to tautology and call it "--contains", meaning that is
the logic used to implement "describe --contains" ;-) but that is
not satisfactory, either.

I dunno.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help