git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 0/5] Use skip_blank_lines() for more commit messages
Date: Wed, 29 Jun 2016 16:14:37 +0200 (CEST)	[thread overview]
Message-ID: <cover.1467209576.git.johannes.schindelin@gmx.de> (raw)

These patches are on top of js/find-commit-subject-ignore-leading-blanks
(whether you want to put them into the same topic branch before merging
or put them into their own add-on topic branch does not really matter to
me).

It occurred to me that there might be more code locations where finding
the commit object's body is hand-rolled, and could benefit from using
the skip_blank_lines() function to handle not-quite-standard but
still-allowed objects from being processed correctly.

I found a couple of instances, and made them consistent with the
pretty-printing machinery.

I made fine-grained commits to allow for dropping contentious patches
more easily.

There are four more instances which I did *not* change:

- fast-export: I designed this command to be as faithful in exporting
  the commits as possible. As such, even non-standard commit objects
  should be kept as-are.

- fmt-merge-msg: when showing signed commit messages, it is better to
  show the commit messages verbatim rather than trimming them.

- when signing a commit, it is better to use the original commit message
  than a munged one.

- notes' messages are left alone. I do not know whether there might be
  an intentional use of leading blank lines, but I wanted to err on the
  safe side.

I also considered treating tag messages the same way, but tags are much
more likely to be signed, and I did not want to risk munging the tag
messages just before signing them.


Johannes Schindelin (5):
  commit -C: skip blank lines at the beginning of the message
  sequencer: use skip_blank_lines() to find the commit subject
  reset --hard: skip blank lines when reporting the commit subject
  commit -S: avoid invalid pointer with empty message
  Skip blank lines when matching <commit>^{/foo}

 builtin/commit.c | 2 +-
 builtin/reset.c  | 2 +-
 commit.c         | 6 +++++-
 sequencer.c      | 6 ++----
 sha1_name.c      | 3 ++-
 5 files changed, 11 insertions(+), 8 deletions(-)

Published-As: https://github.com/dscho/git/releases/tag/more-blank-line-skipping-v1
-- 
2.9.0.270.g810e421

base-commit: 38a2ea1900489a76d9840002bf60bd7ff29f07cd

             reply	other threads:[~2016-06-29 14:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 14:14 Johannes Schindelin [this message]
2016-06-29 14:14 ` [PATCH 1/5] commit -C: skip blank lines at the beginning of the message Johannes Schindelin
2016-06-29 21:59   ` Junio C Hamano
2016-06-29 14:14 ` [PATCH 2/5] sequencer: use skip_blank_lines() to find the commit subject Johannes Schindelin
2016-06-29 22:03   ` Junio C Hamano
2016-06-29 14:14 ` [PATCH 3/5] reset --hard: skip blank lines when reporting " Johannes Schindelin
2016-06-29 14:14 ` [PATCH 4/5] commit -S: avoid invalid pointer with empty message Johannes Schindelin
2016-06-29 14:15 ` [PATCH 5/5] Skip blank lines when matching <commit>^{/foo} Johannes Schindelin
2016-06-29 22:53   ` Junio C Hamano
2016-07-02  6:34     ` Johannes Schindelin
2016-06-29 17:51 ` [PATCH 0/5] Use skip_blank_lines() for more commit messages 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

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

  git send-email \
    --in-reply-to=cover.1467209576.git.johannes.schindelin@gmx.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).