git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ross Kabus <rkabus@aerotech.com>
To: git@vger.kernel.org
Subject: [Bug] commit-tree shouldn't append an extra newline to commit messages
Date: Fri, 1 Sep 2017 14:58:52 -0400	[thread overview]
Message-ID: <CAEVs+za9do_wXC12SSRznF9v9oGw3_Grq2EFDVf8nH1CRgM-Qw@mail.gmail.com> (raw)

Hello,

When doing git commit-tree to manually create a commit object, it can be seen
that the resulting commit's message has an extra appended newline (\n) that
was not present in the input for either argument -m or -F. This is both
undesirable and inconsistent with the git commit porcelain command.

In code this happens in the file "builtin\commit-tree.c" lines #80 and #105
(these lines numbers are the same for master, maint, and next branches). It
seems like the calls to "strbuf_complete_line()" should just be removed to
preserve the original input message exactly. As far as I can tell removing
this call doesn't have any unintended side-effects.

git version 2.13.1.windows.2

Thanks,
Ross

             reply	other threads:[~2017-09-01 18:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 18:58 Ross Kabus [this message]
2017-09-02  8:33 ` [Bug] commit-tree shouldn't append an extra newline to commit messages Jeff King
2017-09-05 15:09   ` Ross Kabus
2017-09-05 15:36     ` Jeff King
2017-09-05 16:57       ` Ross Kabus
2017-09-05 17:03         ` Jeff King
2017-09-05 20:57           ` Ross Kabus
2017-09-05 20:59             ` Ross Kabus
2017-09-07  5:57             ` Jeff King
2017-09-05 21:56           ` Junio C Hamano

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: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CAEVs+za9do_wXC12SSRznF9v9oGw3_Grq2EFDVf8nH1CRgM-Qw@mail.gmail.com \
    --to=rkabus@aerotech.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.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).