summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2014-09-19 03:45:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-19 17:46:15 (GMT)
commitc41a87dd80cd32cfd6e2d670153a9b69dc627f71 (patch)
tree2e46f6355196a3b2c84ef52f32f35c45c5e585e1 /refs.h
parent2892dfeec3f98f7e65a2746d271471d2c3c4af57 (diff)
downloadgit-c41a87dd80cd32cfd6e2d670153a9b69dc627f71.zip
git-c41a87dd80cd32cfd6e2d670153a9b69dc627f71.tar.gz
git-c41a87dd80cd32cfd6e2d670153a9b69dc627f71.tar.bz2
refs: make rev-parse --quiet actually quiet
When a reflog is deleted, e.g. when "git stash" clears its stashes, "git rev-parse --verify --quiet" dies: fatal: Log for refs/stash is empty. The reason is that the get_sha1() code path does not allow us to suppress this message. Pass the flags bitfield through get_sha1_with_context() so that read_ref_at() can suppress the message. Use get_sha1_with_context1() instead of get_sha1() in rev-parse so that the --quiet flag is honored. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index 68c5770..0ca6059 100644
--- a/refs.h
+++ b/refs.h
@@ -206,7 +206,8 @@ extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, cons
int log_ref_setup(const char *refname, char *logfile, int bufsize);
/** Reads log for the value of ref during at_time. **/
-extern int read_ref_at(const char *refname, unsigned long at_time, int cnt,
+extern int read_ref_at(const char *refname, unsigned int flags,
+ unsigned long at_time, int cnt,
unsigned char *sha1, char **msg,
unsigned long *cutoff_time, int *cutoff_tz, int *cutoff_cnt);