git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] commit -t appends newline after template file
@ 2015-05-26  6:15 Patryk Obara
  2015-05-26  6:15 ` [PATCH 1/2] t750*: make tests for commit messages more pedantic Patryk Obara
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Patryk Obara @ 2015-05-26  6:15 UTC (permalink / raw)
  To: git; +Cc: gitster

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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-05-31  2:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-26  6:15 [PATCH 0/2] commit -t appends newline after template file Patryk Obara
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

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).