Skip to content

"git name-rev --weight"

Junio C Hamano git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3name-rev: lose unnecessary typedefbuiltin/name-rev.c+3 -30 replies
2/3name_rev: clarify when a new tip-name is assigned to a commitbuiltin/name-rev.c+25 -200 replies
3/3name-rev: --weight option (WIP)builtin/name-rev.c+95 -29 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] "git name-rev --weight"

So here is an attempt to teach "name-rev" a mode that tries to base its name on oldest tag that can reach the commit. It needs the reset_revision_walk() call recently added to the revision traversal API, and applies to bcc0a3e (v1.7.11-rc0~111^2~2) or newer.

Note that this can benefit from caching, as the "weight" of the tag (rather, the commit that is tagged) will never change once a history is made, but that part is left as an exercise to the reader.

It correctly names 0136db586c in the kernel history as based on v3.5-rc1 as tags/v3.5-rc1~83^2~81^2~76, not on v3.6-rc1, as we saw on the list recently.

Once it is verified to operate correctly and updated to perform properly, we can start passing --weight when "describe --contains" runs the command.

Junio C Hamano (3):
name-rev: lose unnecessary typedef
name_rev: clarify when a new tip-name is assigned to a commit
name-rev: --weight option (WIP)

 builtin/name-rev.c | 142 ++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 120 insertions(+), 22 deletions(-)
Signature · 1 line
1.7.12.285.ga3d5fc0