Skip to contentSkip to conversation

Convert update-ref to use ref_lock API.

RFC In review Shawn Pearce 2 participants 2 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

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.

---

 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
index 475237f..f0e710a 100644
@@ -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
#1 lore raw
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?