]> git.ipfire.org Git - thirdparty/git.git/commit
strbuf: add a helper function to call the editor "on an strbuf"
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 13 Dec 2019 08:08:00 +0000 (08:08 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Dec 2019 20:37:14 +0000 (12:37 -0800)
commitb38dd9e7151f118b989f8c9851bc38a8a8733eaf
tree442c629074f7e0231d18efde47d214697d021a37
parent11f2c0dae8f8889b533455d700121d437f4be19f
strbuf: add a helper function to call the editor "on an strbuf"

This helper supports the scenario where Git has a populated `strbuf` and
wants to let the user edit it interactively.

In `git add -p`, we will use this to allow interactive hunk editing: the
diff hunks are already in memory, but we need to write them out to a
file so that an editor can be launched, then read everything back once
the user is done editing.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
strbuf.c
strbuf.h