git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: "Christian González" <christian.gonzalez@nerdocs.at>
To: Thomas Gummerer <t.gummerer@gmail.com>
Cc: git@vger.kernel.org, Barret Rhoden <brho@google.com>
Subject: Re: feature request: .blameignore
Date: Mon, 15 Apr 2019 23:56:50 +0200	[thread overview]
Message-ID: <5df051ce-007c-cc12-6f02-345b33480c0a@nerdocs.at> (raw)
In-Reply-To: <20190415211519.GG1704@hank.intra.tgummerer.com>

[-- Attachment #1: Type: text/plain, Size: 2001 bytes --]

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@google.com/.

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 #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 16605 bytes --]

  reply	other threads:[~2019-04-15 21:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 20:55 Christian González
2019-04-15 21:15 ` Thomas Gummerer
2019-04-15 21:56   ` Christian González [this message]
2019-04-16 14:52     ` Barret Rhoden
2019-04-16 16:33       ` Christian González

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5df051ce-007c-cc12-6f02-345b33480c0a@nerdocs.at \
    --to=christian.gonzalez@nerdocs.at \
    --cc=brho@google.com \
    --cc=git@vger.kernel.org \
    --cc=t.gummerer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this 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).