aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2011-11-23 19:45:36 +0700
committerJunio C Hamano <gitster@pobox.com>2011-11-23 09:29:53 -0800
commitb4524d343b085b63c68cf5e0a70007c19a048197 (patch)
tree48174482019a129d75c7c10bff717e5cb74e969d /builtin
parent017d1e134545db0d162908f3538077eaa1f34fb6 (diff)
downloadgit-b4524d343b085b63c68cf5e0a70007c19a048197.tar.gz
git-b4524d343b085b63c68cf5e0a70007c19a048197.tar.xz
revert: do not pass non-literal string as format to git_path()
This fixes the following warning. CC builtin/revert.o builtin/revert.c: In function ‘write_cherry_pick_head’: builtin/revert.c:311: warning: format not a string literal and no format arguments Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/revert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index 0c61668b8..9b9b2e574 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -308,7 +308,7 @@ static void write_cherry_pick_head(struct commit *commit, const char *pseudoref)
strbuf_addf(&buf, "%s\n", sha1_to_hex(commit->object.sha1));
- filename = git_path(pseudoref);
+ filename = git_path("%s", pseudoref);
fd = open(filename, O_WRONLY | O_CREAT, 0666);
if (fd < 0)
die_errno(_("Could not open '%s' for writing"), filename);