Re: [PATCH v10 00/20] port branch.c to use ref-filter's printing options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 10, 2017, 20:51 UTC
- Message-ID
- <xmqqbmver63s.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170110084953.15890-1-Karthik.188@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 11 quoted lines
> index 81db67d74..08be8462c 100644 > --- a/Documentation/git-for-each-ref.txt > +++ b/Documentation/git-for-each-ref.txt > @@ -95,13 +95,17 @@ refname:: > The name of the ref (the part after $GIT_DIR/). > For a non-ambiguous short name of the ref append `:short`. > The option core.warnAmbiguousRefs is used to select the strict > + abbreviation mode. If `lstrip=<N>` is appended, strips `<N>` > + slash-separated path components from the front of the refname > + (e.g., `%(refname:lstrip=2)` turns `refs/tags/foo` into `foo` and > + `%(refname:rstrip=2)` turns `refs/tags/foo` into `refs`).
I hiccupped while reading this, as the (e.g.) example talks about rstrip that is not mentioned in the main text that is enhanced by the example.
If `lstrip=<N>` (`rstrip=<N>`) is appended, strips `<N>` slash-separated path components from the front (tail) of the refname (e.g. `%(refname:lstrip=2)` ...
perhaps?
> + if `<N>` is a negative number, then only `<N>` path components > + are left behind.
Begin the sentence with cap? I'd rephrase it a bit while at it if I were doing this:
If `<N>` is a negative number, strip as many path components as necessary from the specified end to leave `-<N>` path components.
Other than the above, looks very good to me.
Thanks.