git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: Rebase will throw away log messages
Date: Fri, 23 Mar 2007 15:11:22 +0000	[thread overview]
Message-ID: <200703231511.24397.andyparkins@gmail.com> (raw)

Hello,

The thread "[PATCH] have merge put FETCH_HEAD data in commit message" reminded 
me of a test I wanted to do after Junio told me off ;-) for putting "--- 
>8 ---" in a log message.  In particular, the objection was that the "---" 
made git-am think the message was at an end.  This combined with the talk of 
git-am in the above thread made me remember that I had more to say about 
git-am being so picky about what it would allow in the log message.

I just made a repository that looked like this:

 * -- * (somebranch)
  \
   X (master)

Then I did a rebase, while on master

 $ git rebase somebranch

Great; rebase worked as expected in terms of reorganising the repository:

 * -- * (somebranch)
       \
        X' (master)

The only thing is this change in the log.  Here is X before the rebase:

commit 3030bf9e3f8434dc3634e768f5e0bd54659bed48
Author: Andy Parkins <andyparkins@gmail.com>
Date:   Fri Mar 23 14:49:24 2007 +0000

    Short log
    
    Long log; line following this has dashes in it
    
    ---
    
    This is after the dashes.

Here is X after the rebase:

commit 575e0c226117d687ae9ba1c3c6b4c8e35cbe5ab7
Author: Andy Parkins <andyparkins@gmail.com>
Date:   Fri Mar 23 14:49:24 2007 +0000

    Short log
    
    Long log; line following this has dashes in it

Oh dear.  Half the log message has gone missing.

Of course the reason will be obvious to you clever chaps: git-rebase uses 
git-am to do the work and the "---" line in the original message causes it to 
drop into "diff starts here mode", and then everything until the "diff --git" 
line is ignored.

Surely git-am needs a better way of detecting the end of the log that that? 

Something more unique than "---" would be a start; "--- [end of log message]" 
sort of thing.

Although they aren't liked on the git list - emails with the different parts 
as different attachments would be a much more reliable input for git-am for 
use in git-rebase.



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

                 reply	other threads:[~2007-03-23 15:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200703231511.24397.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.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 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).