git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jarkko Hietaniemi <jhi@iki.fi>
Cc: git@vger.kernel.org
Subject: Re: wishlist: make it possible to amend commit messages after push to remote
Date: Fri, 07 Aug 2015 09:59:05 -0700	[thread overview]
Message-ID: <xmqqd1yzyqzq.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <55C3FA66.90805@iki.fi> (Jarkko Hietaniemi's message of "Thu, 06 Aug 2015 20:23:02 -0400")

Jarkko Hietaniemi <jhi@iki.fi> writes:

> Not for the first time, and probably not for the last, I pushed a commit
> upstream without adding a link for the bug report as I was meaning to.
>
> Or it could have been...
>
> - Simple typos.
>
> - Broken URLs.
>
> - The following morning / 5 minutes / 5 second later thinking of
> an additional factoid that would've been great to have in the
> commit message.

Unfortunately (or fortunately, depending on your point of view),
these can only be avoided by being careful before you push things
out.  You need to learn to consider the act of publishing as casting
your work in stone to give other people solid foundation to build
on.

> - The impossibility of two consecutive commits referring to each other
> because the older one cannot know what the newer one will be called.

This is fundamental.  You shouldn't be able to "predict"; otherwise
the cryptographic protection of the history would not work.

> In general, I find the fact that once a commit has left the building,
> it goes into your permanent record, and cannot be changed, ever, to be
> very, very annoying. I get the cryptographic "sealing" with all the
> preceding changes, but...

If you really "get" it, you wouldn't be complaining about the
"impossibility" part ;-)

> Not that I've thought this through... but couldn't there be a bunch of
> "aliases" (new SHAs) for a commit?

You could filter-branch, after warning others that you will be
rewinding and rebuilding your history and disrupting their work
(and object replacement with "git replace" and the graft would
be good ways to help you during the filter-branch process, but these
shouldn't be used as a long-term mechanism---it will slow you and
more importantly others down unnecessarily and forever).

  parent reply	other threads:[~2015-08-07 16:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  0:23 wishlist: make it possible to amend commit messages after push to remote Jarkko Hietaniemi
2015-08-07 16:09 ` Kevin Daudt
2015-08-07 17:14   ` Jarkko Hietaniemi
2015-08-07 21:02     ` Philip Oakley
2015-08-07 16:59 ` Junio C Hamano [this message]
2015-08-07 17:10   ` Jarkko Hietaniemi
2015-08-07 19:38     ` Johannes Schindelin
2015-08-07 22:50       ` Jarkko Hietaniemi
2015-08-08  9:24         ` Jeff King

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

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

  git send-email \
    --in-reply-to=xmqqd1yzyqzq.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jhi@iki.fi \
    /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.
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 NNTP newsgroup(s).