[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: whitespace-only changes

From: Sergey Organov
Subject: Re: whitespace-only changes
Date: Fri, 21 Aug 2020 11:55:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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. ]]]
> If git itself doesn't have all the facilities for ignoring trivial
> commits that we would want, we can add those facilities in various ways,
> with patches to git or scripts.  We can offer the patches upstream.

Git has various options to ignore whitespace changes during merge:

   ignore-space-change, ignore-all-space, ignore-space-at-eol,
       Treats lines with the indicated type of whitespace change as
       unchanged for the sake of a three-way merge. Whitespace changes
       mixed with other changes to a line are not ignored. See also
       git-diff(1) -b, -w, --ignore-space-at-eol, and

       •   If their version only introduces whitespace changes to a
           line, our version is used;

       •   If our version introduces whitespace changes but their
           version includes a substantial change, their version is

       •   Otherwise, the merge proceeds in the usual way.

OTOH, when merging, by design Git never looks at individual commits, it
rather performs 3-way merge with respect to common ancestor, so no
marking of individual commits would help.

-- Sergey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]