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

[PATCH v4 0/2] Add in-place editing support to git interpret-trailers

From
Tobias Klauser <tklauser@distanz.ch>
Date
Jan 14, 2016, 16:57 UTC
Message-ID
<1452790676-11937-1-git-send-email-tklauser@distanz.ch>

This patch series adds support for in-place editing to git interpret-trailers akin to sed -i, perl -i.

v3->v4:
 - Reword a test title, as suggested by Eric Sunshine.
 - Add a test to verify that the original file is not clobbered/deleted
   on error, as suggested by Eric Sunshine.
 - Move code specific to in-place editing from process_trailers() into a
   separate function to keep the overall flow clean. Suggested by Eric
   Sunshine.
 - Drop unnecessary braces, as pointed out by Eric Sunshine.
 - Use a more meaningful title for patch 1/2. Suggested by Junio Hamano.
v2->v3:
 - Rephrase two error messages according to the suggestions by Matthieu
   Moy.
v1->v2:
 - Split patch to make review easier, as suggested by Matthieu Moy.
 - Rename FILE * function parameters to a more readable name, as
   suggested by Matthieu Moy.
 - Write output to temporary file and rename after successfully written
   in full to avoid losing the original file in case of an
   error/interrupt. Pointed out by Eric Sunshine.
Tobias Klauser (2):
  trailer: allow to write to files other than stdout
  interpret-trailers: add option for in-place editing
 Documentation/git-interpret-trailers.txt | 24 ++++++++++-
 builtin/interpret-trailers.c             | 13 ++++--
 t/t7513-interpret-trailers.sh            | 40 ++++++++++++++++++
 trailer.c                                | 69 +++++++++++++++++++++++++-------
 trailer.h                                |  3 +-
 5 files changed, 129 insertions(+), 20 deletions(-)
-- 
2.7.0.1.g5e091f5
Next: Tobias Klauser
Message 1 of 17 in “Add in-place editing support to git interpret-trailers”
  1. 0/2 Add in-place editing support to git interpret-trailersTobias Klauser, Jan 14, 2016
  2. 1/2 trailer: allow to write to files other than stdoutTobias Klauser, Jan 14, 2016
  3. 2/2 interpret-trailers: add option for in-place editingTobias Klauser, Jan 14, 2016
  4. Junio C HamanoJan 14, 2016
  5. Tobias KlauserJan 15, 2016
  6. Junio C HamanoJan 15, 2016
  7. Tobias KlauserJan 15, 2016
  8. Eric SunshineJan 18, 2016
  9. Junio C HamanoJan 19, 2016
  10. Eric SunshineJan 19, 2016
  11. Eric SunshineJan 19, 2016
  12. Junio C HamanoJan 19, 2016
  13. Eric SunshineJan 19, 2016
  14. Junio C HamanoJan 19, 2016
  15. Eric SunshineJan 20, 2016
  16. Eric SunshineJan 18, 2016
  17. Tobias KlauserJan 19, 2016

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.