aboutsummaryrefslogtreecommitdiffstats
path: root/wrapper.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-11-08 10:33:22 -0800
committerJunio C Hamano <gitster@pobox.com>2025-11-08 10:33:22 -0800
commit60f8ade254763597bc52ae425fc7abb0ea3c57ae (patch)
tree19e9674ff6018a07cd86db9972e7baea4d736bba /wrapper.h
parentMerge branch 'ps/object-source-loose' into seen (diff)
parentrebase: support --trailer (diff)
downloadgit-60f8ade254763597bc52ae425fc7abb0ea3c57ae.tar.gz
git-60f8ade254763597bc52ae425fc7abb0ea3c57ae.zip
Merge branch 'lc/rebase-trailer' into seen
Refactor code paths to run "interpret-trailers" from "git commit/tag" and use it in "git rebase". Comments? * lc/rebase-trailer: rebase: support --trailer trailer: append trailers in-process and drop the fork to `interpret-trailers` trailer: move process_trailers to trailer.h interpret-trailers: factor out buffer-based processing to process_trailers()
Diffstat (limited to 'wrapper.h')
-rw-r--r--wrapper.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/wrapper.h b/wrapper.h
index 44a8597ac3..e5f867b200 100644
--- a/wrapper.h
+++ b/wrapper.h
@@ -57,6 +57,12 @@ static inline ssize_t write_str_in_full(int fd, const char *str)
void write_file_buf(const char *path, const char *buf, size_t len);
/**
+ * Like write_file_buf(), but report errors instead of exiting. Returns 0 on
+ * success or a negative value on error after emitting a message.
+ */
+int write_file_buf_gently(const char *path, const char *buf, size_t len);
+
+/**
* Like write_file_buf(), but format the contents into a buffer first.
* Additionally, write_file() will append a newline if one is not already
* present, making it convenient to write text files: