Re: [PATCH] blame: add the ability to ignore commits
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 14, 2019, 17:45 UTC
- Message-ID
- <xmqqfttvw2sv.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20190114101956.2b899d0e@brho.roam.corp.google.com>
Barret Rhoden <brho@google.com> writes:
Show 24 quoted lines
> On 2019-01-10 at 14:29 Junio C Hamano <gitster@pobox.com> wrote: >> > For instance, commit X does this: >> > >> > -foo(x,y); >> > +foo(x,y,z); >> > >> > Then commit Y comes along to reformat it: >> > >> > -foo(x,y,z); >> > +foo(x, y, z); >> > >> > And the history / rev-list for the file looks like: >> > >> > ---O---A---X---B---C---D---Y---E---F >> > >> > I want to ignore/skip Y and see X in the blame output. >> >> If you skip Y, the altered history would have "foo(x, y, z)" in E, >> "foo(x,y,z)" in X, and "foo(x,y)" in A. If you start blaming from >> F, you'd get E as the commit that explains the latest state. If you >> do not skip Y, you'd get Y. I am not sure how you'd get X in either >> case. > > The way to do it is ...
Sorry, I made a too-fuzzy statement. What I meant was, that unless you are ignoring E, I do not know why you "would want to" attribute a line "foo(x, y, z)" that appears in F to X. Starting from X up to D (and to Y in real history, but you are ignoring Y), the line was "foo(x,y,z)", after E, it is "foo(x, y, z)". I didn't mean to ask how you "would show" such a result---as I do not yet understand why you would want such a result to begin with.