All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Martine Lenders <mlenders@riot-os.org>
Cc: git@vger.kernel.org, authmillenon@riot-os.org, john@keeping.me.uk
Subject: Re: Feature request: Configurable prefixes for git commit --fixup and --squash
Date: Thu, 03 Mar 2016 16:59:02 +0100	[thread overview]
Message-ID: <vpq1t7rlfi1.fsf@anie.imag.fr> (raw)
In-Reply-To: <CALHmdRwgDjRJMQSPzp34aS25ZHg-mr458QeyYgyp85q8g34Aig@mail.gmail.com> (Martine Lenders's message of "Thu, 3 Mar 2016 15:33:34 +0100")

Martine Lenders <mlenders@riot-os.org> writes:

> Hi John,
> yes, it can be anywhere in the commit message and I already thought
> about using a hook for generating the commit message too, but the
> problem is then, that `git rebase` won't pair up the commit for
> squashing/fixing up with the original commit.

It won't match if you put it in the subject line, but John's proposal is
to put it at the bottom (i.e. in the body). This won't disturb "git
rebase --autosquash".

> Maybe another approach could be to allow for a configuration of a
> string that is ignored when matching the commit messages in `git
> rebase`.

I wish I could write commit messages like

fixup! deadbeef: fix typo (foo -> bar)

So that the commit message contains both the instruction for "rebase
--autosquash" and a quick explanation of what the commit is doing (as
usual commit messages).

AFAIK, it's not possible currently but shouldn't be hard to implement.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  parent reply	other threads:[~2016-03-03 15:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 12:47 Feature request: Configurable prefixes for git commit --fixup and --squash Martine Lenders
2016-03-03 13:21 ` John Keeping
2016-03-03 13:58   ` Matthieu Moy
2016-03-03 14:38     ` Martine Lenders
2016-03-03 14:52       ` Matthieu Moy
2016-03-03 14:33   ` Martine Lenders
2016-03-03 14:44     ` John Keeping
2016-03-03 15:59     ` Matthieu Moy [this message]
2016-03-03 16:48       ` Martine Lenders
2016-03-03 17:09         ` Matthieu Moy
2016-03-03 17:23           ` Junio C Hamano
2016-03-03 17:34             ` Matthieu Moy

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=vpq1t7rlfi1.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=authmillenon@riot-os.org \
    --cc=git@vger.kernel.org \
    --cc=john@keeping.me.uk \
    --cc=mlenders@riot-os.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.