summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-31 22:39:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-31 22:39:03 (GMT)
commitd75bb73bcf2ecce38c147980aac0cbc27a6b838a (patch)
tree915571f195467d0a8b441455a94d6dca3c95f697 /cache.h
parent2ba6183b0b809ff10ec212e1f7b4c9f72fc076ae (diff)
parent1f76a10b2d72245332ac41bd79249cb82f3946f0 (diff)
downloadgit-d75bb73bcf2ecce38c147980aac0cbc27a6b838a.zip
git-d75bb73bcf2ecce38c147980aac0cbc27a6b838a.tar.gz
git-d75bb73bcf2ecce38c147980aac0cbc27a6b838a.tar.bz2
Merge branch 'jc/am-state-fix'
Recent reimplementation of "git am" changed the format of state files kept in $GIT_DIR/rebase-apply/ without meaning to do so, primarily because write_file() API was cumbersome to use and it was easy to mistakenly make text files with incomplete lines. Update write_file() interface to make it harder to misuse. * jc/am-state-fix: write_file(): drop caller-supplied LF from calls to create a one-liner file write_file_v(): do not leave incomplete line at the end write_file(): drop "fatal" parameter builtin/am: make sure state files are text builtin/am: introduce write_state_*() helper functions
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 8de519a..e5a6b7f 100644
--- a/cache.h
+++ b/cache.h
@@ -1577,8 +1577,9 @@ static inline ssize_t write_str_in_full(int fd, const char *str)
{
return write_in_full(fd, str, strlen(str));
}
-__attribute__((format (printf, 3, 4)))
-extern int write_file(const char *path, int fatal, const char *fmt, ...);
+
+extern int write_file(const char *path, const char *fmt, ...);
+extern int write_file_gently(const char *path, const char *fmt, ...);
/* pager.c */
extern void setup_pager(void);