summaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorLibravatar Jiang Xin <zhiyou.jx@alibaba-inc.com>2019-12-30 08:47:27 +0800
committerLibravatar Jiang Xin <zhiyou.jx@alibaba-inc.com>2019-12-30 08:47:27 +0800
commit173fff68dabefc07c69b9d7b96eee06e3d506a20 (patch)
tree21f11b938a3150de572c12e61c187b33f2728d77 /strbuf.h
parentl10n: Update Catalan translation (diff)
parentGit 2.25-rc0 (diff)
downloadtgif-173fff68dabefc07c69b9d7b96eee06e3d506a20.tar.xz
Merge tag 'v2.25.0-rc0' into git-po-master
Git 2.25-rc0 * tag 'v2.25.0-rc0': (531 commits) Git 2.25-rc0 sparse-checkout: improve OS ls compatibility dir.c: use st_add3() for allocation size dir: consolidate similar code in treat_directory() dir: synchronize treat_leading_path() and read_directory_recursive() dir: fix checks on common prefix directory t4015: improve coverage of function context test commit: forbid --pathspec-from-file --all t3434: mark successful test as such notes.h: fix typos in comment t6030: don't create unused file t5580: don't create unused file t3501: don't create unused file bisect--helper: convert `*_warning` char pointers to char arrays. The sixth batch fix-typo: consecutive-word duplications Makefile: drop GEN_HDRS built-in add -p: show helpful hint when nothing can be staged built-in add -p: only show the applicable parts of the help text built-in add -p: implement the 'q' ("quit") command ...
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index 84cf969721..bfa66569a4 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -621,6 +621,17 @@ int launch_editor(const char *path, struct strbuf *buffer,
int launch_sequence_editor(const char *path, struct strbuf *buffer,
const char *const *env);
+/*
+ * In contrast to `launch_editor()`, this function writes out the contents
+ * of the specified file first, then clears the `buffer`, then launches
+ * the editor and reads back in the file contents into the `buffer`.
+ * Finally, it deletes the temporary file.
+ *
+ * If `path` is relative, it refers to a file in the `.git` directory.
+ */
+int strbuf_edit_interactively(struct strbuf *buffer, const char *path,
+ const char *const *env);
+
void strbuf_add_lines(struct strbuf *sb,
const char *prefix,
const char *buf,