From: Karthik Nayak Date: Sat, 14 Jan 2017 10:03:39 GMT Subject: Re: [PATCH v10 00/20] port branch.c to use ref-filter's printing options Message-ID: In-Reply-To: On Wed, Jan 11, 2017 at 2:21 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> 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=` is appended, strips `` >> + 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=` (`rstrip=`) is appended, strips `` > slash-separated path components from the front (tail) of the > refname (e.g. `%(refname:lstrip=2)` ... > > perhaps? > >> + if `` is a negative number, then only `` 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 `` is a negative number, strip as many path components > as necessary from the specified end to leave `-` path > components. > > Other than the above, looks very good to me. > > Thanks. I like how you rephrased it. So apart form this and the other change suggested by you and Jacob, nothing to be added. Should I re-roll? -- Regards, Karthik Nayak