diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-26 18:25:13 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-26 19:20:52 +0100 |
commit | 11c8c965c3419fddf2444a7497b45b65f05d3db5 (patch) | |
tree | 41657d3be31ab8fe808b040834a1dda42db6173d /Debian | |
parent | 3c2fdc3b9e35352aabbc8b09c286aba2fbfab2ac (diff) |
ref updates: Introduce update_ref_cmd
Currently the comment about `message may be modified' is rather
misleading, since there is no code to do that - but it explains the
semantics of the new function.
We change the appropriate subset of the git update-ref call sites.
These are precisely the ones where we previously specified a message
with -m, except for the quilt cache (where we use the reflog message
as the cache lookup key).
The calls are updates of internal refs etc.
We end up using qw(git) rather than @git.
Otherwise no functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Dgit.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 57b79e8..2bac485 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -51,7 +51,7 @@ BEGIN { git_rev_parse git_cat_file git_get_ref git_get_symref git_for_each_ref git_for_each_tag_referring is_fast_fwd - git_check_unmodified + git_check_unmodified git_update_ref_cmd $package_re $component_re $deliberately_re $distro_re $versiontag_re $series_filename_re $extra_orig_namepart_re @@ -492,6 +492,13 @@ sub is_fast_fwd ($$) { } } +sub git_update_ref_cmd { + # returns qw(git update-ref), qw(-m), @_ + # except that message may be modified to honour GIT_REFLOG_ACTION + my $msg = shift @_; + return qw(git update-ref -m), $msg, @_; +} + sub changedir ($) { my ($newdir) = @_; printdebug "CD $newdir\n"; |