Re: [PATCH v2 1/3] merge: setup `opts` later in `checkout_fast_forward()`
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- May 16, 2018, 19:29 UTC
- Message-ID
- <CAN0heSqdVB3SmQnBeJB06f4uXzUBM6OC2ySZNZnhJdisbR28Kg@mail.gmail.com>
- In-Reply-To
- <CAGZ79kYBykcbzKxc_FHiL6dt=jkmK2Khe-e5aSxFephe=RsBFA@mail.gmail.com>
On 16 May 2018 at 18:41, Stefan Beller <sbeller@google.com> wrote:
Show 7 quoted lines
> On Wed, May 16, 2018 at 9:30 AM, Martin Ågren <martin.agren@gmail.com> wrote: >> >> This patch is best viewed using something like this (note the tab!): >> --color-moved --anchored=" trees[nr_trees] = parse_tree_indirect" > > Heh! Having a "is best viewed" paragraph is the new shiny thing in > commit messages as 'git log origin/pu --grep "is best viewed"' tells me.
:-)
> Regarding the anchoring, I wonder if we can improve it by ignoring > whitespaces or just looking for substrings, or by allowing regexes or ...
FWIW, because my first naive attempt failed (for some reason I did not consider the leading tab part of the "line" so I did not provide it), I had the same thought. Ignoring leading whitespace seemed easy enough in the implementation.
Then I started thinking about all the ways in which whitespace can be ignored. My reaction in the end was to not try and open that can right there and then. I did not think about regexes.
I guess this boils down to the usage. Copying the line to anchor on from an editor could run into these kind of whitespace-issues, and shell escaping. Typing an anchor could become easier with regexes since one could skip typing common substrings and just anchor on /unique-part/.
Martin