Re: [PATCH] blame: add the ability to ignore commits

2019-01-14 Thread Junio C Hamano
"Randall S. Becker" writes: > On January 14, 2019 12:46, Junio C Hamano wrote: >> Barret Rhoden writes: >> >> > On 2019-01-10 at 14:29 Junio C Hamano wrote: >> >> > For instance, commit X does this: >> >> > >> >> > -foo(x,y); >> >> > +foo(x,y,z); >> >> > >> >> > Then commit Y comes along to re

Re: [PATCH] blame: add the ability to ignore commits

2019-01-14 Thread Barret Rhoden
On 2019-01-14 at 13:26 "Randall S. Becker" wrote: > > > > 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 rea

RE: [PATCH] blame: add the ability to ignore commits

2019-01-14 Thread Randall S. Becker
On January 14, 2019 12:46, Junio C Hamano wrote: > Barret Rhoden writes: > > > On 2019-01-10 at 14:29 Junio C Hamano 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); > >

Re: [PATCH] blame: add the ability to ignore commits

2019-01-14 Thread Junio C Hamano
Barret Rhoden writes: > On 2019-01-10 at 14:29 Junio C Hamano 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 look

Re: [PATCH] blame: add the ability to ignore commits

2019-01-14 Thread Barret Rhoden
On 2019-01-10 at 14:29 Junio C Hamano 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-

Re: [PATCH] blame: add the ability to ignore commits

2019-01-10 Thread Junio C Hamano
Barret Rhoden writes: > 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

Re: [PATCH] blame: add the ability to ignore commits

2019-01-09 Thread Stefan Beller
On Tue, Jan 8, 2019 at 10:26 AM Junio C Hamano wrote: > > Barret Rhoden writes: > > >> A policy decision like the above two shouldn't be hardcoded in the > >> feature like this, but should be done as a separate option. By > >> default, these shouldn't be marked with '*', as the same tools you >

Re: [PATCH] blame: add the ability to ignore commits

2019-01-09 Thread Barret Rhoden
Hi - On 2019-01-08 at 10:26 Junio C Hamano wrote: > >> Obviously, an interesting consideration is what happens when a merge > >> commit is skipped. Is it sufficient to change this description to > >> "...will get passed to its parentS", or would the code do completely > >> nonsensical things wit

Re: [PATCH] blame: add the ability to ignore commits

2019-01-08 Thread Junio C Hamano
Barret Rhoden writes: >> A policy decision like the above two shouldn't be hardcoded in the >> feature like this, but should be done as a separate option. By >> default, these shouldn't be marked with '*', as the same tools you >> said you are afraid of breaking would be expecting a word with on

Re: [PATCH] blame: add the ability to ignore commits

2019-01-08 Thread Barret Rhoden
On 2019-01-08 at 11:41 Barret Rhoden wrote: > Would you be OK with > also changing fsck to take a committish instead of a full SHA-1? Actually, in retrospect, I can keep the unabbreviated SHA-1 for the file inputs and use get_oid_committish() for the one-off --skip-rev= cases. Thanks, Barret

Re: [PATCH] blame: add the ability to ignore commits

2019-01-08 Thread Barret Rhoden
On 2019-01-08 at 14:12 Ævar Arnfjörð Bjarmason wrote: > On Mon, Jan 07 2019, Barret Rhoden wrote: > > > +static int handle_ignore_file(const char *path, struct string_list > > *ignores) > > +{ > > + FILE *fp = fopen(path, "r"); > > + struct strbuf sb = STRBUF_INIT; > > + > > + if (!fp) > >

Re: [PATCH] blame: add the ability to ignore commits

2019-01-08 Thread Barret Rhoden
On 2019-01-07 at 15:13 Junio C Hamano wrote: > If I read it correctly, this gives a very limited form of -S, in the > sense that anything this can do can be expressed by using -S but the > reverse is not true, but is designed to be easier to use, in the > sense that unlike -S, this does not have t

Re: [PATCH] blame: add the ability to ignore commits

2019-01-08 Thread Ævar Arnfjörð Bjarmason
On Mon, Jan 07 2019, Barret Rhoden wrote: > +static int handle_ignore_file(const char *path, struct string_list *ignores) > +{ > + FILE *fp = fopen(path, "r"); > + struct strbuf sb = STRBUF_INIT; > + > + if (!fp) > + return -1; > + while (!strbuf_getline(&sb, fp)) { >

Re: [PATCH] blame: add the ability to ignore commits

2019-01-07 Thread Junio C Hamano
Barret Rhoden writes: > Commits that make formatting changes or renames are often not > interesting when blaming a file. This commit, similar to > git-hyper-blame, allows one to specify certain revisions to ignore during > the blame process. > > To ignore a revision, put its committish in a file

[PATCH] blame: add the ability to ignore commits

2019-01-07 Thread Barret Rhoden
Commits that make formatting changes or renames are often not interesting when blaming a file. This commit, similar to git-hyper-blame, allows one to specify certain revisions to ignore during the blame process. To ignore a revision, put its committish in a file specified by --ignore-file= or use