diff options
author | David Turner <dturner@twopensource.com> | 2015-07-21 17:04:52 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-21 14:07:59 -0700 |
commit | abd0cd3a3018e1c4e9e4437fb3911d6658e99fec (patch) | |
tree | f6d25ec6ea6d7ee8897f0f2b45fe7cfecbd47285 /refs.h | |
parent | 4e2bef57c9629ef869091d9ad41dc6d09528a662 (diff) | |
download | git-abd0cd3a3018e1c4e9e4437fb3911d6658e99fec.tar.gz |
refs: new public ref function: safe_create_reflog
The safe_create_reflog function creates a reflog, if it does not
already exist.
The log_ref_setup function becomes private and gains a force_create
parameter to force the creation of a reflog even if log_all_ref_updates
is false or the refname is not one of the special refnames.
The new parameter also reduces the need to store, modify, and restore
the log_all_ref_updates global before reflog creation.
In a moment, we will use this to add reflog creation commands to
git-reflog.
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -191,7 +191,7 @@ extern int peel_ref(const char *refname, unsigned char *sha1); /* * Setup reflog before using. Fill in err and return -1 on failure. */ -int log_ref_setup(const char *refname, struct strbuf *logfile, struct strbuf *err); +int safe_create_reflog(const char *refname, int force_create, struct strbuf *err); /** Reads log for the value of ref during at_time. **/ extern int read_ref_at(const char *refname, unsigned int flags, |