From: Junio C Hamano <gitster@pobox•com>
To: Jakub Narebski <jnareb@gmail•com>
Cc: Brandon Casey <casey@nrlssc•navy.mil>,
Werner LEMBERG <wl@gnu•org>,
git@vger•kernel.org, keithp@keithp•com
Subject: Re: serious problem with `git format-patch' & `git am'
Date: Thu, 26 Feb 2009 18:10:46 -0800 [thread overview]
Message-ID: <7viqmwpr2x.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <m3ljrsvg0e.fsf@localhost.localdomain> (Jakub Narebski's message of "Thu, 26 Feb 2009 17:11:45 -0800 (PST)")
Jakub Narebski <jnareb@gmail•com> writes:
> I think you want undocumented but for the git-am usage (e.g. 'git am
> -h') --rebasing option to git-am, which makes git-am preserve Subject:
> line formatting,...
I have to warn that that one requires you to have proper commit object
to begin with. IOW, the first line "From [0-9a-f]{40} date" must record
an existing object name.
As you said, "am" is for applying e-mailed patches and filter-branch would
be the best fit for fixing imported history, but whichever tool is used, I
think it is a mistake to try preserving a "one-line-per-paragraph" format
the original poster seems to have, i.e.:
foo foo foo foo
bar bar bar bar
baz baz baz baz
Yes, the low-level could create a commit object with a message like that,
but all the Porcelains rely on "paragraphs are separated with a blank
line" format. So no matter how the conversion is done, I think it would
be a good idea to turn the above into:
foo foo foo foo
bar bar bar bar
baz baz baz baz
if the user wants to keep the resulting history any useful.
To do it with "format-patch | am", you would format it like:
Subject: foo foo foo foo
From: author name <author.name@domain>
Date: author date
bar bar bar bar
baz baz baz baz
next prev parent reply other threads:[~2009-02-27 2:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-25 22:03 serious problem with `git format-patch' & `git am' Werner LEMBERG
2009-02-26 10:42 ` Johannes Schindelin
2009-02-26 18:00 ` Brandon Casey
2009-02-27 1:11 ` Jakub Narebski
2009-02-27 2:10 ` Junio C Hamano [this message]
2009-02-27 15:47 ` Brandon Casey
2009-02-27 17:53 ` Junio C Hamano
2009-02-27 9:16 ` Werner LEMBERG
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=7viqmwpr2x.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox$(echo .)com \
--cc=casey@nrlssc$(echo .)navy.mil \
--cc=git@vger$(echo .)kernel.org \
--cc=jnareb@gmail$(echo .)com \
--cc=keithp@keithp$(echo .)com \
--cc=wl@gnu$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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