Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH 2/2] vcs_info git: For the branch name, try to find a symbolic name before falling back to a raw commit hex.
- X-seq: zsh-workers 43316
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: [PATCH 2/2] vcs_info git: For the branch name, try to find a symbolic name before falling back to a raw commit hex.
- Date: Sun, 19 Aug 2018 12:32:47 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=+P5W8e kSRnkp85C97yEuduMbUmG3UNPL1qpjTcGbDF4=; b=fH7B9sw+NFh04YKdUmTdNe 7HXED7CauVdIsmODkgnmEwWt7S/DEJ+n9W/wrsY91gRqKJsdC7WylDIEgaVted4S BN1I4AnJaFOIaI8pp78O9vCRuGJey+Bo+LhgddnFsHkgz8sbUa7EPtkCGrgBK8mb r20XJdIZLUnR0qYbES6k8r+/g+J67kNAll02fPiW4fkyPZtLlug8v2Ct+UhSl0km W5V883QgiaYG/+GVfEJCPYf0vYT/6SNmoDYA3gnOXqVHuBINZPFh9xoAbUDf3DKi uNDkO2rHNdJFuGNZgxtVhhLhW+1+tjoT4XN7qSogfJt4c2CDMNJHdqfOsw3IX33w ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=+P5W8e kSRnkp85C97yEuduMbUmG3UNPL1qpjTcGbDF4=; b=FLKovaMd6lS0SsIhq+Ynln jAXlBqpdKw4tU0ZgSu2BgTMjthGy6EFFnPUaD/3CHB0luJDs9t4+In1YDpVVz5UV M64Q/LMiOxZj3YYzGeQav6AF/j86Grt3a+UxSsyu9nlnm1elG6jjXRlVbFAzWNka 80g9+DDSjvxNl79wtPBfGyGNshUMKOyAOo9oAaLiL/4+PlvIqc32bgv0NRxh1VUP dc1vW81byHBzCqamWwKchWWlu/Hu2NThF27DjXzvrXipRBOPyNUcHilNEC/WR6Lg x8MmFCTZOi4vsTWmY1jhYLWVf+zdCX+F3/Dg84UWCK13hxSOSdigTmJwoQ8woDUg ==
- In-reply-to: <87y3d3mmpz.fsf@ft.bewatermyfriend.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180818155719.23574-1-danielsh@tarpaulin.shahaf.local2> <20180818155719.23574-2-danielsh@tarpaulin.shahaf.local2> <87y3d3mmpz.fsf@ft.bewatermyfriend.org>
Frank Terbeck wrote on Sat, 18 Aug 2018 22:41 +0200:
> Daniel Shahaf wrote:
> > Ask git-describe(1) and git-name-rev(1) to compute a gitrevisions(1)
> > name in terms of a branch or tag that contains (= is a descendant of,
> > is younger than) HEAD.
> >
> > In this repository, the output changes from "9567bfe..." to
> > "master~1" or "remotes/origin/HEAD~1".
> > ---
> > WDYT?
>
> I like it. Maybe use a style to make it possible to get the old
> behavior back, if someone prefers it?
Thanks for the review. Two thoughts about this:
1. Adding knobs induces a maintenance cost going forward. Is that cost
justified in this case? We can always add the knob later if there's
demand for it, but it's harder to take away behaviour once it has
been released.
2. At what point in the if-chain do we raise the white flag^W^W^W^W
check the "early exit?" style?
I suppose we could overload the `use-simple` style for this purpose (the
git backend doesn't currently use that style). The `get-revision` style
is also relevant.
Cheers,
Daniel
P.S. This also kicks in during bisects, resulting in values such as "bisect/bad~20".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author