unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Gregory Heytings <gregory@heytings.org>,
	Visuwesh <visuweshm@gmail.com>,
	Philip Kaludercic <philipk@posteo.net>,
	Lars Ingebrigtsen <larsi@gnus.org>,
	emacs-devel@gnu.org
Subject: Re: Amending commits
Date: Sun, 25 Sep 2022 20:17:40 +0000	[thread overview]
Message-ID: <YzC3ZMBnniiVVh0n@ACM> (raw)
In-Reply-To: <jwvedvzi7gw.fsf-monnier+emacs@gnu.org>

Hello, Stefan.

On Sun, Sep 25, 2022 at 15:26:39 -0400, Stefan Monnier wrote:
> >> As someone who does not really understand Git, does this mean we are
> >> rewriting the log message without also committing a change?  I thought
> >> that was not allowed by Git.
> > git commit --amend is mainly used to change a commit before pushing
> > it.  Rewriting history (i.e. changing an already public commit) is (by
> > default) not possible.

> When people say that in Git you cannot rewrite history, what it means is
> that you can't change anything about a given *commit id* (aka
> "revision").
> Of course, you can create a new revision (i.e. a different commit id)
> with any content you like.  Things like `rebase` and `filter-repo` are
> more general version of `commit --amend` and work in the same way, by
> writing a whole new history.

At the risk of drifting off topic, this is a misfeature of git (and
other VCSs).  When people commit software changes, and get it wrong,
this can be fixed by another commit.

When people commit software changes and get the commit message wrong,
this cannot be fixed.  Whether it be misspelling somebody's name,
missing out the bug number, or whatever, mistakes can't be corrected.

This seems to have been caused by a misunderstanding by the authors of
git (and other VCSs), who thought that the commit message was a
fundamental part of the commit.  It's not, any more than the label on a
bottle of beer is part of the beer.  You don't drink labels, just as you
don't ship commit messages to the users of (binary) software.

Those authors thought that nobody makes mistakes in their commit
messages.  Or at least, nobody that matters.  They, of course, never
make such mistakes themselves.  ;-)  It would have been a simple enough
matter, in a VCS, for the commit message for a specific commit itself to
have had revisions.  Instead, we have repositories filled with unfixable
errors.

Rant over.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



  parent reply	other threads:[~2022-09-25 20:17 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 10:14 Amending commits Lars Ingebrigtsen
2022-09-25 10:50 ` Philip Kaludercic
2022-09-25 11:39   ` Lars Ingebrigtsen
2022-09-25 13:58     ` Eli Zaretskii
2022-09-26 10:42       ` Lars Ingebrigtsen
2022-09-26 11:38         ` Eli Zaretskii
2022-09-26 12:00           ` Lars Ingebrigtsen
2022-09-26 15:53             ` Eli Zaretskii
2022-09-27 11:37               ` Lars Ingebrigtsen
2022-09-27 11:54                 ` Eli Zaretskii
2022-09-27 12:00                   ` Lars Ingebrigtsen
2022-09-27 14:01                 ` Robert Pluim
2022-09-27 15:35                 ` Sean Whitton
2022-09-27 15:40                   ` Lars Ingebrigtsen
2022-09-27 16:10                     ` Sean Whitton
2022-09-27 16:17                       ` Lars Ingebrigtsen
2022-09-27 22:04                         ` Sean Whitton
2022-09-28 10:57                           ` Lars Ingebrigtsen
2022-09-27 16:15                     ` Gregory Heytings
2022-09-28 18:09                   ` Juri Linkov
2022-09-28 20:42                     ` Sean Whitton
2022-09-26 14:35         ` Rudolf Schlatte
2022-09-25 11:46   ` Visuwesh
2022-09-25 12:49     ` Philip Kaludercic
2022-09-25 13:19       ` Andreas Schwab
2022-09-25 13:49         ` Philip Kaludercic
2022-09-25 16:56     ` Manuel Giraud
2022-09-25 18:04     ` Gregory Heytings
2022-09-25 19:26       ` Stefan Monnier
2022-09-25 20:15         ` Gregory Heytings
2022-09-25 20:37           ` Dmitry Gutov
2022-09-25 20:46             ` Gregory Heytings
2022-09-25 22:26               ` Stefan Monnier
2022-09-26  7:53                 ` Gregory Heytings
2022-09-26  8:15                   ` Andreas Schwab
2022-09-26  8:23                     ` Gregory Heytings
2022-09-26  8:29                       ` Andreas Schwab
2022-09-26  8:39                         ` Gregory Heytings
2022-09-26  8:49                           ` Andreas Schwab
2022-09-26  9:16                             ` Gregory Heytings
2022-09-26  9:26                               ` Andreas Schwab
2022-09-26 10:22                                 ` Gregory Heytings
2022-09-25 20:17         ` Alan Mackenzie [this message]
2022-09-26 10:43     ` Lars Ingebrigtsen

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=YzC3ZMBnniiVVh0n@ACM \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=gregory@heytings.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=philipk@posteo.net \
    --cc=visuweshm@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 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).