git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* blame --ignore-rev - add place to specify defaults at repo level
@ 2019-08-28 17:07 Terry Davis
  2019-09-16 15:03 ` Barret Rhoden
  0 siblings, 1 reply; 2+ messages in thread
From: Terry Davis @ 2019-08-28 17:07 UTC (permalink / raw)
  To: git

The new blame options (--ignore-rev, --ignore-revs-file) and config options
(blame.markIgnoredLines,  blame.markUnblamables,  blame.ignoreRevsFile) are
great, and much appreciated. However, for my primary use (one-time
automated reformatting of an entire repository), there is still some
friction preventing adoption.

Adding a default location for the config options (much like .gitignore)
specified above would have the following benefits:

   1. New users of a repository would not need to take the extra step of
   configuring their workspace for blame. This is most impactful for open
   source projects with many contributors.
   2. Git services (github, gitlab, etc.) could incorporate this feature
   into their blame systems automatically.

If this has already been discussed, please point me to the thread, as I am
a new member of this list.

If my proposal is worth considering, I'd be happy to provide more input.

--Terry

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: blame --ignore-rev - add place to specify defaults at repo level
  2019-08-28 17:07 blame --ignore-rev - add place to specify defaults at repo level Terry Davis
@ 2019-09-16 15:03 ` Barret Rhoden
  0 siblings, 0 replies; 2+ messages in thread
From: Barret Rhoden @ 2019-09-16 15:03 UTC (permalink / raw)
  To: Terry Davis, git

Hi -

On 8/28/19 1:07 PM, Terry Davis wrote:
> The new blame options (--ignore-rev, --ignore-revs-file) and config options
> (blame.markIgnoredLines,  blame.markUnblamables,  blame.ignoreRevsFile) are
> great, and much appreciated. However, for my primary use (one-time
> automated reformatting of an entire repository), there is still some
> friction preventing adoption.
> 
> Adding a default location for the config options (much like .gitignore)
> specified above would have the following benefits:
> 
>     1. New users of a repository would not need to take the extra step of
>     configuring their workspace for blame. This is most impactful for open
>     source projects with many contributors.
>     2. Git services (github, gitlab, etc.) could incorporate this feature
>     into their blame systems automatically.
> 
> If this has already been discussed, please point me to the thread, as I am
> a new member of this list.

Sorry for the delayed response.  In v1 I had a default ignore file:

https://public-inbox.org/git/20190107213013.231514-1-brho@google.com/

The first few responses have some feedback in that area.  The short 
version: don't give the users potentially incorrect results without them 
knowing about it.  Though if in practice users just run a one-time 
script to turn on a default ignore file and then never think about it 
again, that might be less of a concern.

But we do return "incorrect" results from blame ignore.  We have a bunch 
of 'mark' options to help with this, but I don't think there was a 
consensus on what the best ones were.  Some people wanted to see any 
ignored lines, some wanted to see unblamables, some not, etc.  I can 
picture users who are unfamiliar with blame-ignore getting annoyed by 
tracing through a line's history and getting surprised by a wrong answer.

Maybe once the feature gains popularity and gets used a bit more, we can 
learn what good defaults are, and then we can make a particular ignore 
file a default setting.  I'd be fine with that, but then again I had a 
default file in the first place.  =)

FWIW, I just set a single ignore-revs-file globally, though that will 
only work if every project uses the same filename.  I went with 
".git-blame-ignore-revs", which is what ChromeOS did for hyper-blame and 
what I use on some of my projects.

Thanks,

Barret


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-16 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 17:07 blame --ignore-rev - add place to specify defaults at repo level Terry Davis
2019-09-16 15:03 ` Barret Rhoden

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).