Web lists-archives.com

Re: feature request: .blameignore




Am 15.04.19 um 23:15 schrieb Thomas Gummerer:
> This sounds roughly like what Barret Rhoden (added to Cc) has been
> working on.  I haven't followed that patch series in detail, but you
> can have a look at it atthe latest iteration at
> https://public-inbox.org/git/20190410162409.117264-1-brho@xxxxxxxxxx/.

As far as I can see this is an "automagic" way of creating those "blame
skips" - which can be easier in some way, but until it works "perfect"
It is prone to produce problems IMHO.

The git history is a "document" that _has_ not to be changed by design.
So if this "heuristic" produces a wrong result, it's kind of
unpredictable what was wrong.

I think it would be MUCH easier to mark chunks or whole commits as  "not
important" explicitly - by using a file.

Look at .gitignore: git isn't trying to heuristically determine which
files should be ignored when committing. This is done explicitly in a
.gitignore file.

For blames this could be done too.

Heuristics could lead to other kind of problems too, as the engine does
not know anything about the project. Maybe there will be a programming
language in near future where trailing whitespaces matter (bah, please
not). But the project should decide, not git itself.

So IMHO project specific .*ignore files are the better way of handling
this than doing the skipping on heuristics alone - which could be
helpful though when *creating* that files, even during the commit
process... like

    git ccheckut
    git: 'ccheckut' is not a git command. See 'git --help'.

    The most similar command is
    checkout

Maybe a lazy:

    git commit -a -m "big, clunky, fixes everything and the rest"

could produce a message like:

    There are whitespace changes in files <file_a>, <file_b> ... -
    git automatically marked them as not important
    commits. They are ignored when using git-blame.

Christian

--

Dr. Christian González
https://nerdocs.at

Attachment: pEpkey.asc
Description: application/pgp-keys