git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v8 0/11] Port tag.c over to use ref-filter APIs

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 3, 2015, 20:21 UTC
Message-ID
<xmqq8u9s86n3.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAOLa=ZTYWTjc-OC7N7FGWETP1svpCkqhQ2wwPmbf5nVRyPRAqg@mail.gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 35 quoted lines
> This is part of my GSoC project to unify git tag -l, git branch -l,
> git for-each-ref.  This patch series is continued from: Git (next)
> https://github.com/git/git/commit/bf5418f49ff0cebc6e5ce04ad1417e1a47c81b61
>
> This series consists of porting tag.c over to using the ref-filter APIs
>
> Version 7 can be found here:
> http://thread.gmane.org/gmane.comp.version-control.git/274990
>
> Changes:
> * Make padright a general align atom.
> * Make print_value() and emit() output to a strbuf rather than stdout directly.
>
> Interdiff:
>
> diff --git a/Documentation/git-for-each-ref.txt
> b/Documentation/git-for-each-ref.txt
> index bcf319a..e89b9b0 100644
> --- a/Documentation/git-for-each-ref.txt
> +++ b/Documentation/git-for-each-ref.txt
> @@ -127,11 +127,12 @@ color::
>      Change output color.  Followed by `:<colorname>`, where names
>      are described in `color.branch.*`.
>
> -padright::
> -    Pad succeeding atom or string to the right. Followed by
> -    `:<value>`, where `value` states the total length of atom or
> -    string including the padding. If the `value` is lesser than
> -    the atom or string length, then no padding is performed.
> +align::
> +    Align succeeding atoms to the right, left or middle. Followed
> +    by `:<type>,<paddinglength>`, where the `<type>` is either
> +    left, right or middle and `<paddinglength>` is the total
> +    length of the padding to be performed. If the atom length is
> +    more than the padding length then no padding is performed.

It is very very dissapointing to allow the "next atom only" implementation to squat on a good name "align:<type>,<width>", especially when I thought that the list agreed

  %(align:<type>,<width>) any string with or without %(atom) %(end)
would be the way to go.
Previous: Karthik NayakNext: Karthik Nayak
Message 17 of 20 in “Port tag.c over to use ref-filter APIs”
  1. 0/11 Port tag.c over to use ref-filter APIsKarthik Nayak, Aug 3, 2015
  2. 01/11 ref-filter: print output to strbuf for formattingKarthik Nayak, Aug 3, 2015
  3. Junio C HamanoAug 3, 2015
  4. Karthik NayakAug 3, 2015
  5. 02/11 ref-filter: introduce ref_formatting_stateKarthik Nayak, Aug 3, 2015
  6. Junio C HamanoAug 3, 2015
  7. Karthik NayakAug 3, 2015
  8. 03/11 ref-filter: implement an `align` atomKarthik Nayak, Aug 3, 2015
  9. 04/11 ref-filter: add option to filter only tagsKarthik Nayak, Aug 3, 2015
  10. 05/11 ref-filter: support printing N lines from tag annotationKarthik Nayak, Aug 3, 2015
  11. 06/11 ref-filter: add support to sort by versionKarthik Nayak, Aug 3, 2015
  12. 07/11 ref-filter: add option to match literal patternKarthik Nayak, Aug 3, 2015
  13. 08/11 tag.c: use 'ref-filter' data structuresKarthik Nayak, Aug 3, 2015
  14. 09/11 tag.c: use 'ref-filter' APIsKarthik Nayak, Aug 3, 2015
  15. 10/11 tag.c: implement '--format' optionKarthik Nayak, Aug 3, 2015
  16. 11/11 tag.c: implement '--merged' and '--no-merged' optionsKarthik Nayak, Aug 3, 2015
  17. Junio C HamanoAug 3, 2015
  18. Karthik NayakAug 3, 2015
  19. Junio C HamanoAug 3, 2015
  20. Karthik NayakAug 3, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.