git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patryk Obara <patryk.obara@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: [PATCH 0/2] commit -t appends newline after template file
Date: Tue, 26 May 2015 08:15:06 +0200	[thread overview]
Message-ID: <1432620908-16071-1-git-send-email-patryk.obara@gmail.com> (raw)

These are my first patches to git, so be extra pedantic during review, please.

I noticed, that newline is appended, when I try to use template file - which
is annoying if template ends with comment. I digged a bit and it turned out
that:

* my editor (vim) was appending newline before eof in template, (I forgot
  about this); most editors, that I tested appends newline before eof by
  default. Emacs was exception here.

* commit --status appends newline unconditionally before placing first
  comment line - it needs to do this or comment might be appended to last line
  of template file. Usually, in result two newlines are appended after
  template file content - and unexpected empty line appears in editor.

* tests for git-commit do not verify newlines at all

I fixed tests and wrote few more (patch 1/2) - after applying this patch
some tests won't pass (they shouldn't be passing in the first place imo).
Patch 2 fixes all broken tests.

More detailed description is in mails to follow.

             reply	other threads:[~2015-05-26  6:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26  6:15 Patryk Obara [this message]
2015-05-26  6:15 ` [PATCH 1/2] t750*: make tests for commit messages more pedantic Patryk Obara
2015-05-28 13:34   ` Eric Sunshine
2015-05-28 18:55     ` Junio C Hamano
2015-05-26  6:15 ` [PATCH 2/2] commit: fix ending newline for template files Patryk Obara
2015-05-28 14:29   ` Eric Sunshine
2015-05-28 18:22     ` Junio C Hamano
2015-05-28 18:35       ` Eric Sunshine
2015-05-29 20:17         ` Junio C Hamano
2015-05-29 22:25           ` Eric Sunshine
2015-05-30 11:29             ` Patryk Obara
2015-05-31  2:21               ` Eric Sunshine
2015-05-30 16:59             ` Junio C Hamano
2015-05-28 10:06 ` [PATCH 0/2] commit -t appends newline after template file Patryk Obara

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=1432620908-16071-1-git-send-email-patryk.obara@gmail.com \
    --to=patryk.obara@gmail.com \
    --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).