summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-21 20:28:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-21 20:28:10 (GMT)
commit3c85452bb0ad744f453bb6b8e8373483a8bfc590 (patch)
tree58442bf182c21acddf0606370209f7d073beedf2 /builtin/log.c
parent13da0fc092b8cf082eda2f16971c75903aa5aefc (diff)
parent65732845e89eee69422b725bb495f4282065284f (diff)
downloadgit-3c85452bb0ad744f453bb6b8e8373483a8bfc590.zip
git-3c85452bb0ad744f453bb6b8e8373483a8bfc590.tar.gz
git-3c85452bb0ad744f453bb6b8e8373483a8bfc590.tar.bz2
Merge branch 'rs/ref-transaction'
The API to update refs have been restructured to allow introducing a true transactional updates later. We would even allow storing refs in backends other than the traditional filesystem-based one. * rs/ref-transaction: (25 commits) ref_transaction_commit: bail out on failure to remove a ref lockfile: remove unable_to_lock_error refs.c: do not permit err == NULL remote rm/prune: print a message when writing packed-refs fails for-each-ref: skip and warn about broken ref names refs.c: allow listing and deleting badly named refs test: put tests for handling of bad ref names in one place packed-ref cache: forbid dot-components in refnames branch -d: simplify by using RESOLVE_REF_READING branch -d: avoid repeated symref resolution reflog test: test interaction with detached HEAD refs.c: change resolve_ref_unsafe reading argument to be a flags field refs.c: make write_ref_sha1 static fetch.c: change s_update_ref to use a ref transaction refs.c: ref_transaction_commit: distinguish name conflicts from other errors refs.c: pass a list of names to skip to is_refname_available refs.c: call lock_ref_sha1_basic directly from commit refs.c: refuse to lock badly named refs in lock_ref_sha1_basic rename_ref: don't ask read_ref_full where the ref came from refs.c: pass the ref log message to _create/delete/update instead of _commit ...
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 68d5d30..734aab3 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1400,7 +1400,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (check_head) {
unsigned char sha1[20];
const char *ref, *v;
- ref = resolve_ref_unsafe("HEAD", sha1, 1, NULL);
+ ref = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
+ sha1, NULL);
if (ref && skip_prefix(ref, "refs/heads/", &v))
branch_name = xstrdup(v);
else