Convert update-ref to use ref_lock API.
RFC 3/5 Convert update-ref to use ref_lock API.
This conversion also adds the '-m' switch to update-ref allowing the caller to record why the ref is changing. At present this is merely copied down into the ref_lock API.
Signed-off-by Shawn O. Pearce <[email protected]>
---
Documentation/git-update-ref.txt | 2 - update-ref.c | 103 ++++++++++++++------------------------ 2 files changed, 38 insertions(+), 67 deletions(-)
4f017fce63b3cb56065731967a9684cb36ddd12e
Documentation/git-update-ref.txt +1 -1
@@ -7,7 +7,7 @@ git-update-ref - update the object name SYNOPSIS -------- -'git-update-ref' <ref> <newvalue> [<oldvalue>] +'git-update-ref' <ref> <newvalue> [<oldvalue>] [-m <reason>] DESCRIPTION -----------
update-ref.c +37 -66
122 lines not on this page · raw message
Signature · 1 line
1.3.2.g7278
Quoted 2 lines · Shawn Pearce
-'git-update-ref' <ref> <newvalue> [<oldvalue>] +'git-update-ref' <ref> <newvalue> [<oldvalue>] [-m <reason>]
Is it just me who feels "cmd [-m <reason>] <ref> <new> [<old>]" would look more natural?