git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] commit -t appends newline after template file

From
Patryk Obara <patryk.obara@gmail.com>
Date
May 26, 2015, 06:15 UTC
Message-ID
<1432620908-16071-1-git-send-email-patryk.obara@gmail.com>
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.
Next: Patryk Obara
Message 1 of 14 in “commit -t appends newline after template file”
  1. 0/2 commit -t appends newline after template filePatryk Obara, May 26, 2015
  2. 1/2 t750*: make tests for commit messages more pedanticPatryk Obara, May 26, 2015
  3. Eric SunshineMay 28, 2015
  4. Junio C HamanoMay 28, 2015
  5. 2/2 commit: fix ending newline for template filesPatryk Obara, May 26, 2015
  6. Eric SunshineMay 28, 2015
  7. Junio C HamanoMay 28, 2015
  8. Eric SunshineMay 28, 2015
  9. Junio C HamanoMay 29, 2015
  10. Eric SunshineMay 29, 2015
  11. Patryk ObaraMay 30, 2015
  12. Eric SunshineMay 31, 2015
  13. Junio C HamanoMay 30, 2015
  14. Patryk ObaraMay 28, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.