unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Daniel Martín" <mardani29@yahoo.es>
To: Richard Stallman <rms@gnu.org>
Cc: eliz@gnu.org,  emacs-devel@gnu.org
Subject: Re: whitespace-only changes
Date: Thu, 20 Aug 2020 22:50:17 +0200	[thread overview]
Message-ID: <m1wo1trqie.fsf@yahoo.es> (raw)
In-Reply-To: <E1k8aul-0001mr-Mg@fencepost.gnu.org> (Richard Stallman's message of "Wed, 19 Aug 2020 23:06:55 -0400")

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> Larsi wrote:
>
>   > Thanks for the patch, but we don't normally apply whitespace-only fixes,
>   > because that makes it harder to investigate, later (with git blame and
>   > friends), what previous code changes did.
>
> I am sure he knows what he's talking about, but it is unfortunate that
> we cannot fix bad indentation.  Can't we correct this problem somehow?
>
> For instance, label whitespace changes clearly in the commit log, and
> change some tools to ignore them?

Git 2.23 introduced a feature to make git blame ignore these kind of
commits that only contain refactoring changes. The steps to make it work
are as follows:

First, add a .git-blame-ignore-revs to the root of the repository. This
file should contain the list of commit hashes to ignore (one per line).

Then, each developer should configure their local environment to take
the .git-blame-ignore-revs file into account by running the following
command from a shell:

$ git config blame.ignoreRevsFile .git-blame-ignore-revs

It's not an ideal solution, though. It depends on having a recent
version of git installed, only works for git blame, and it won't work if
someone is using https://git.savannah.gnu.org to check the history of
code changes, for example.

--
Daniel Martín



  parent reply	other threads:[~2020-08-20 20:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  3:06 whitespace-only changes Richard Stallman
2020-08-20  8:04 ` Mattias Engdegård
2020-08-20 13:19 ` Eli Zaretskii
2020-08-20 13:32   ` Lars Ingebrigtsen
2020-08-20 14:54     ` David Engster
2020-08-21  3:33       ` Richard Stallman
2020-08-21  8:55         ` Sergey Organov
2020-08-23  4:42           ` Richard Stallman
2020-08-20 20:50 ` Daniel Martín [this message]
2020-08-20 20:54   ` Lars Ingebrigtsen
2020-08-20 21:07     ` Daniel Martín
2020-08-21 13:13 ` Stefan Monnier
2020-08-22  3:51   ` Richard Stallman

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: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m1wo1trqie.fsf@yahoo.es \
    --to=mardani29@yahoo.es \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).