Re: [PATCH v14 00/13] Port tag.c to use ref-filter.c
Karthik Nayak <karthik.188@gmail.com> writes:
Show 9 quoted lines
> diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
> index 06d468e..1b48b95 100644
> --- a/Documentation/git-for-each-ref.txt
> +++ b/Documentation/git-for-each-ref.txt
> @@ -149,6 +149,7 @@ Its first line is `contents:subject`, where subject is the concatenation
> of all lines of the commit message up to the first blank line. The next
> line is 'contents:body', where body is all of the lines after the first
> blank line. Finally, the optional GPG signature is `contents:signature`.
> +The first `N` lines of the object is obtained using `contents:lines=N`.
"Finally" in the last line of the context is no longer accurate.
Show 15 quoted lines
> +test_expect_success 'check `%(contents:lines=X)`' '
> + cat >expect <<-\EOF &&
> + master three
> + side four
> + odd/spot three
> + double-tag Annonated doubly
> + four four
> + one one
> + signed-tag A signed tag message
> + three three
> + two two
> + EOF
> + git for-each-ref --format="%(refname:short) %(contents:lines=1)" >actual &&
> + test_cmp expect actual
> +'
Nit: I would find it more readable with an actual separator (anything
but a space) between %(refname) and %(contents).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/