3 # Copyright © 2016, 2020
4 # mirabilos <m@mirbsd.org>
6 # Thorsten “mirabilos” Glaser <thorsten.glaser@teckids.org>
7 # Copyright © 2011, 2012, 2013, 2014, 2015, 2018, 2019
8 # Thorsten “mirabilos” Glaser <t.glaser@tarent.de>
10 # martin f krafft (madduck)
12 # Copyright (c) 2007 Andy Parkins
14 # This code is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License version 2 as
16 # published by the Free Software Foundation.
18 # An example hook script to mail out commit update information.
20 # This script is not under active development by the git team, with
21 # git-multimail being suggested as replacement. It has downsides,
22 # of course; this script is maintained as a fork, by mirabilos, for
23 # 100% compatibility with the old version, plus bugfixes (encoding)
24 # and new features (more and better diffs shown; cURL triggers and
25 # “KGB” bot support, etc.) and optional FusionForge integration.
27 # This hook sends emails listing new revisions to the repository
28 # introduced by the change being reported. The rule is that (for
29 # branch updates) each commit will appear on one email and one email
32 # This hook is stored in the contrib/hooks directory. Your distribution
33 # will have put this somewhere standard. You should make this script
34 # executable then link to it in the repository you would like to use it in.
35 # For example, on Debian the hook is stored in
36 # /usr/share/git-core/contrib/hooks/post-receive-email
37 # but as /etc/gforge/plugins/scmgit/post-receive-email.sh in FusionForge.
39 # chmod a+x post-receive-email
40 # cd /path/to/your/repository.git
41 # ln -sf /usr/share/git-core/contrib/hooks/post-receive-email hooks/post-receive
43 # ln -sf /etc/gforge/plugins/scmgit/post-receive-email.sh hooks/post-receive
44 # # but that can only be used for a Forge-controlled repository
46 # This hook script needs the “C.UTF-8” locale set up (or change below).
47 # Other requirementa are: The MirBSD Korn Shell (mksh) as /bin/mksh;
48 # PHP with the mbstring extension (preferred) or Perl 5; curl, if you
49 # wish to use the curltrigger functionality.
51 # This hook script assumes it is enabled on the central repository of a
52 # project, with all users pushing only to it and not between each other. It
53 # will still work if you don't operate in that style, but it would become
54 # possible for the email to be from someone other than the person doing the
57 # To help with debugging and use on pre-v1.5.1 git servers, this script will
58 # also obey the interface of hooks/update, taking its arguments on the
59 # command line. Unfortunately, hooks/update is called once for each ref.
60 # To avoid firing one email per ref, this script just prints its output to
61 # the screen when used in this mode. The output can then be redirected if
67 # This is the list that all pushes will go to; leave it blank to not send
68 # emails for every ref update. This fills the To header, so use comma for
69 # multiple recipients (but please only use addresses, not full names).
71 # This is the list(s) that all pushes of annotated tags will go to. Leave
72 # it blank to default to the mailinglist field. The announce emails list
73 # the short log summary of the changes since the last annotated tag.
75 # If set, replies are requested to be directed to this eMail address(es).
76 # hooks.envelopesender
77 # If set then the -f option is passed to sendmail to allow the envelope
78 # sender to be set (one address only). This is also used as From header.
80 # If set, e.g. to '[SCM] ', all eMails have their subjects prefixed
81 # with this string to aid filtering.
83 # If set, this is used in the Subject instead of the description file.
85 # The shell command used to format each revision in the email, with
86 # "%s" replaced with the commit id. Defaults to "git rev-list -1
87 # --pretty %s", displaying the commit id, author, date and log
88 # message. To list full patches separated by a blank line, you
89 # could set this to "git show -C %s; echo". If you do that, make
90 # sure to remove the "-p" from hooks.diffopts to avoid getting
91 # two sets of diffs (the showrev diff is per commit, whereas the
92 # diffopts patch will show what really happened in the push as
94 # To list a gitweb/cgit URL *and* a full patch for each change set, use this:
95 # "t=%s; printf 'http://.../?id=%%s' \$t; echo;echo; git show -C \$t; echo"
96 # Be careful if "..." contains things that will be expanded by shell "eval"
99 # The maximum number of lines that should be included in the generated
100 # email body. If not specified, there is no limit.
101 # Lines beyond the limit are suppressed and counted, and a final
102 # line is added indicating the number of suppressed lines.
104 # Alternate options for the git diff-tree invocation that shows changes.
105 # Default is "-p --stat --summary --find-copies-harder". Remove -p from
106 # those options to skip including a unified diff of changes in addition
107 # to the summary output. See hooks.showrev for more discussion on this.
109 # Full path to a configuration file for kgb-client, or unset/empty.
110 # If set, kgb-client will be invoked.
112 # List (expanded by shell “for”, so be careful) of URIs to trigger on
113 # each push to be accessed with cURL.
117 # All emails include the headers "X-Git-Refname", "X-Git-Oldrev",
118 # "X-Git-Newrev", and "X-Git-Reftype" to enable fine tuned filtering and
119 # give information for debugging.
122 # ---------------------------- Environment Sanitisation
126 unset LANGUAGE LC_ALL
127 export LANG=C LC_ADDRESS=C LC_COLLATE=C LC_CTYPE=C.UTF-8 \
128 LC_IDENTIFICATION=C LC_MEASUREMENT=C LC_MESSAGES=C \
129 LC_MONETARY=C LC_NAME=C LC_NUMERIC=C LC_PAPER=C \
130 LC_TELEPHONE=C LC_TIME=C
132 # ---------------------------- Functions
135 # Function to prepare for email generation. This decides what type
136 # of update this is and whether an email should even be generated.
141 oldrev=$(git rev-parse $1)
142 newrev=$(git rev-parse $2)
146 # 0000->1234 (create)
147 # 1234->2345 (update)
148 # 2345->0000 (delete)
149 if expr "$oldrev" : '0*$' >/dev/null
153 if expr "$newrev" : '0*$' >/dev/null
161 # --- Get the revision types
162 newrev_type=$(git cat-file -t $newrev 2> /dev/null)
163 oldrev_type=$(git cat-file -t "$oldrev" 2> /dev/null)
164 case "$change_type" in
167 rev_type="$newrev_type"
171 rev_type="$oldrev_type"
175 # The revision type tells us what type the commit is, combined with
176 # the location of the ref we can decide between
181 case "$refname","$rev_type" in
185 short_refname=${refname##refs/tags/}
189 refname_type="annotated tag"
190 short_refname=${refname##refs/tags/}
192 if [ -n "$announcerecipients" ]; then
193 recipients="$announcerecipients"
198 refname_type="branch"
199 short_refname=${refname##refs/heads/}
201 refs/changes/*,commit)
203 refname_type="review change"
204 short_refname=${refname##refs/}
206 refs/remotes/*,commit)
208 refname_type="tracking branch"
209 short_refname=${refname##refs/remotes/}
210 echo >&2 "*** Push-update of tracking branch, $refname"
211 echo >&2 "*** - no email generated."
215 # Anything else (is there anything else?)
216 echo >&2 "*** Unknown type of update to $refname ($rev_type)"
217 echo >&2 "*** - no email generated"
222 # Check if we've got anyone to send to
223 if [ -z "$recipients" ]; then
224 case "$refname_type" in
226 config_name="hooks.announcelist"
229 config_name="hooks.mailinglist"
232 echo >&2 "*** $config_name is not set so no email will be sent"
233 echo >&2 "*** for $refname update $oldrev->$newrev"
241 # Top level email generation function. This calls the appropriate
242 # body-generation routine after outputting the common header.
244 # Note this function doesn't actually generate any email output, that is
245 # taken care of by the functions it calls:
246 # - generate_email_header
247 # - generate_create_XXXX_email
248 # - generate_update_XXXX_email
249 # - generate_delete_XXXX_email
250 # - generate_email_footer
252 # Note also that this function cannot 'exit' from the script; when this
253 # function is running (in hook script mode), the send_mail() function
254 # is already executing in another process, connected via a pipe, and
255 # if this function exits without, whatever has been generated to that
256 # point will be sent as an email... even if nothing has been generated.
261 # The email subject will contain the best description of the ref
262 # that we can build from the parameters
263 describe=$(git describe $rev 2>/dev/null)
264 if [ -z "$describe" ]; then
268 generate_email_header
270 # Call the correct body generation function
272 case "$refname_type" in
273 "tracking branch"|branch)
281 if [ -z "$maxlines" ]; then
282 generate_${change_type}_${fn_name}_email
284 generate_${change_type}_${fn_name}_email | limit_lines $maxlines
287 generate_email_footer
290 generate_email_header()
292 local routing_headers subj senc failc=0
295 # --- Email (all stdout will be the email)
298 routing_headers="To: $recipients"
299 [[ -n $envelopesender ]] && routing_headers="From: $envelopesender${nl}$routing_headers"
300 [[ -n $replyto ]] && routing_headers="$routing_headers${nl}Reply-To: $replyto"
302 subj="Subject: ${emailprefix}$shortdesc $refname_type $short_refname ${change_type}d. $describe"
304 # Try to encode. Strongly prefer PHP over Perl and Python, sadly;
305 # evidence provided in Debian bugs #787511, #787512, #787513,
306 # #819155, #879204, #879205, #881955, #907891 though.
307 senc=$(print -nr -- "$subj" | php -r '
308 mb_internal_encoding("UTF-8");
309 echo mb_encode_mimeheader(file_get_contents("php://stdin"),
310 "UTF-8", "Q", "\012");
311 ' 2>/dev/null) || { (( failc |= 1 )); senc=; }
312 [[ $senc = Subject:?("$nl")' '* ]] || { (( failc |= 2 )); senc=; }
313 [[ -n $senc ]] || senc=$(print -nr -- "$subj" | perl \
314 -C7 -0777 -Mutf8 -MEncode -e "
315 print encode('MIME-Q', <>);
316 " 2>/dev/null) || { (( failc |= 4 )); senc=; }
317 [[ $senc = Subject:?("$nl")' '* ]] || { (( failc |= 8 )); senc=; }
319 if [[ -z $senc ]]; then
320 print -u2 "E: Subject empty, RFC2047 MIME encoding failed"
321 if ! whence -p php >/dev/null 2>&1; then
322 : show only the Perl-related error messages below
323 elif (( failc & 1 )); then
324 print -u2 "N: PHP encoding failed, perhaps install php-mbstring."
325 elif (( failc & 2 )); then
326 print -u2 "N: PHP encoding produced bad output, WTF‽"
328 if (( failc & 4 )); then
329 print -u2 "N: Perl encoding failed, WTF‽ Also, install PHP."
330 elif (( failc & 8 )); then
331 print -u2 "N: Perl encoding produced bad output, install PHP!"
333 senc="Subject: post-receive-email: no Subject, RFC2047 MIME encoding failed"
336 if [[ $shortdesc = "$projectdesc" ]]; then
344 Content-Type: text/plain; charset=UTF-8
345 Content-Transfer-Encoding: 8bit
347 X-Git-Refname: $refname
348 X-Git-Reftype: $refname_type
349 X-Git-Oldrev: $oldrev
350 X-Git-Newrev: $newrev
352 Auto-Submitted: auto-generated
354 This is an automated email from the git hooks/post-receive script.
355 It was generated because a ref change was pushed to the repository
356 "$repolabel" containing the project
359 The $refname_type, $short_refname has been ${change_type}d
363 generate_email_footer()
375 # --------------- Branches
378 # Called for the creation of a branch
380 generate_create_branch_email()
382 # This is a new branch and so oldrev is not valid
383 echo " at $newrev ($newrev_type)"
386 local newrevs=$(show_new_revisions)
388 if [[ -z $newrevs ]]; then
389 echo "No new revisions were added by this update."
393 echo "Below, we list all revisions that are new to this repository and"
394 echo "have not appeared on any other notification email. The diff below"
395 echo "represents the summarised changes from the first known parent:"
399 print -r -- "$newrevs"
401 # experimental summarised changes diff
403 echo "Summary of changes:"
404 git rev-parse --not "${other_branches[@]}" | \
405 git rev-list --parents --topo-order --reverse --stdin $newrev | \
407 read -p commit parent otherparents
408 git -c core.quotePath=false diff-tree $diffopts \
409 "${parent:-$(:|git hash-object -t tree --stdin)}" "$newrev"
413 # Called for the change of a pre-existing branch
415 generate_update_branch_email()
418 # 1 --- 2 --- O --- X --- 3 --- 4 --- N
420 # O is $oldrev for $refname
421 # N is $newrev for $refname
422 # X is a revision pointed to by some other ref, for which we may
423 # assume that an email has already been generated.
424 # In this case we want to issue an email containing only revisions
425 # 3, 4, and N. Given (almost) by
427 # git rev-list N ^O --not --all
429 # The reason for the "almost", is that the "--not --all" will take
430 # precedence over the "N", and effectively will translate to
432 # git rev-list N ^O ^X ^N
434 # So, we need to build up the list more carefully. git rev-parse
435 # will generate a list of revs that may be fed into git rev-list.
436 # We can get it to make the "--not --all" part and then filter out
439 # git rev-parse --not --all | grep -v N
441 # Then, using the --stdin switch to git rev-list we have effectively
444 # git rev-list N ^O ^X
446 # This leaves a problem when someone else updates the repository
447 # while this script is running. Their new value of the ref we're
448 # working on would be included in the "--not --all" output; and as
449 # our $newrev would be an ancestor of that commit, it would exclude
450 # all of our commits. What we really want is to exclude the current
451 # value of $refname from the --not list, rather than N itself. So:
453 # git rev-parse --not --all | grep -v $(git rev-parse $refname)
455 # Get's us to something pretty safe (apart from the small time
456 # between refname being read, and git rev-parse running - for that,
460 # Next problem, consider this:
461 # * --- B --- * --- O ($oldrev)
463 # * --- X --- * --- N ($newrev)
465 # That is to say, there is no guarantee that oldrev is a strict
466 # subset of newrev (it would have required a --force, but that's
467 # allowed). So, we can't simply say rev-list $oldrev..$newrev.
468 # Instead we find the common base of the two revs and list from
471 # As above, we need to take into account the presence of X; if
472 # another branch is already in the repository and points at some of
473 # the revisions that we are about to output - we don't want them.
474 # The solution is as before: git rev-parse output filtered.
476 # Finally, tags: 1 --- 2 --- O --- T --- 3 --- 4 --- N
478 # Tags pushed into the repository generate nice shortlog emails that
479 # summarise the commits between them and the previous tag. However,
480 # those emails don't include the full commit messages that we output
481 # for a branch update. Therefore we still want to output revisions
482 # that have been output on a tag email.
484 # Luckily, git rev-parse includes just the tool. Instead of using
485 # "--all" we use "--branches"; this has the added benefit that
486 # "remotes/" will be ignored as well.
488 # List all of the revisions that were removed by this update, in a
489 # fast-forward update, this list will be empty, because rev-list O
490 # ^N is empty. For a non-fast-forward, O ^N is the list of removed
494 for rev in $(git rev-list $newrev..$oldrev)
496 revtype=$(git cat-file -t "$rev")
497 echo " discards $rev ($revtype)"
499 if [ -z "$rev" ]; then
503 # List all the revisions from baserev to newrev in a kind of
504 # "table-of-contents"; note this list can include revisions that
505 # have already had notification emails and is present to show the
506 # full detail of the change from rolling back the old revision to
507 # the base revision and then forward to the new revision
508 for rev in $(git rev-list $oldrev..$newrev)
510 revtype=$(git cat-file -t "$rev")
511 echo " via $rev ($revtype)"
514 if [ "$fast_forward" ]; then
515 echo " from $oldrev ($oldrev_type)"
517 # 1. Existing revisions were removed. In this case newrev
518 # is a subset of oldrev - this is the reverse of a
519 # fast-forward, a rewind
520 # 2. New revisions were added on top of an old revision,
521 # this is a rewind and addition.
523 # (1) certainly happened, (2) possibly. When (2) hasn't
524 # happened, we set a flag to indicate that no log printout
529 # Find the common ancestor of the old and new revisions and
530 # compare it with newrev
531 baserev=$(git merge-base $oldrev $newrev)
533 if [ "$baserev" = "$newrev" ]; then
534 echo "This update discarded existing revisions and left the branch pointing at"
535 echo "a previous point in the repository history."
537 echo " * -- * -- N ($newrev)"
539 echo " O -- O -- O ($oldrev)"
541 echo "The removed revisions are not necessarily gone - if another reference"
542 echo "still refers to them they will stay in the repository."
545 echo "This update added new revisions after undoing existing revisions. That is"
546 echo "to say, the old revision is not a strict subset of the new revision. This"
547 echo "situation occurs when you --force push a change and generate a repository"
548 echo "containing something like this:"
550 echo " * -- * -- B -- O -- O -- O ($oldrev)"
552 echo " N -- N -- N ($newrev)"
554 echo "When this happens we assume that you've already had alert emails for all"
555 echo "of the O revisions, and so we here report only the revisions in the N"
556 echo "branch from the common base, B."
561 [[ -n $rewind_only ]] || newrevs=$(show_new_revisions)
564 if [[ -z $newrevs ]]; then
565 echo "No new revisions were added by this update."
569 echo "Those revisions listed above that are new to this repository have"
570 echo "not appeared on any other notification email; so we list those"
571 echo "revisions in full, below."
575 print -r -- "$newrevs"
578 # The diffstat is shown from the old revision to the new revision.
579 # This is to show the truth of what happened in this change.
580 # There's no point showing the stat from the base to the new
581 # revision because the base is effectively a random revision at this
582 # point - the user will be interested in what this revision changed
583 # - including the undoing of previous revisions in the case of
584 # non-fast-forward updates.
586 echo "Summary of changes:"
587 git -c core.quotePath=false diff-tree $diffopts $oldrev..$newrev
591 # Called for the deletion of a branch
593 generate_delete_branch_email()
598 git diff-tree -s --always --encoding=UTF-8 --pretty=oneline $oldrev
602 # --------------- Annotated tags
605 # Called for the creation of an annotated tag
607 generate_create_atag_email()
609 echo " at $newrev ($newrev_type)"
615 # Called for the update of an annotated tag (this is probably a rare event
616 # and may not even be allowed)
618 generate_update_atag_email()
620 echo " to $newrev ($newrev_type)"
621 echo " from $oldrev (which is now obsolete)"
627 # Called when an annotated tag is created or changed
629 generate_atag_email()
631 # Use git for-each-ref to pull out the individual fields from the
633 eval $(git for-each-ref --shell --format='
634 tagobject=%(*objectname)
635 tagtype=%(*objecttype)
637 tagged=%(taggerdate)' $refname
640 echo " tagging $tagobject ($tagtype)"
644 # If the tagged object is a commit, then we assume this is a
645 # release, and so we calculate which tag this tag is
647 prevtag=$(git describe --abbrev=0 $newrev^ 2>/dev/null)
649 if [ -n "$prevtag" ]; then
650 echo " replaces $prevtag"
654 echo " length $(git cat-file -s $tagobject) bytes"
657 echo " tagged by $tagger"
663 # Show the content of the tag message; this might contain a change
664 # log or release notes so is worth displaying.
665 git cat-file tag $newrev | sed -e '1,/^$/d'
670 # Only commit tags make sense to have rev-list operations
672 if [ -n "$prevtag" ]; then
673 # Show changes since the previous release
674 git shortlog --encoding=UTF-8 "$prevtag..$newrev"
676 # No previous tag, show all the changes since time
678 git shortlog --encoding=UTF-8 $newrev
682 # XXX: Is there anything useful we can do for non-commit
691 # Called for the deletion of an annotated tag
693 generate_delete_atag_email()
698 git diff-tree -s --always --encoding=UTF-8 --pretty=oneline $oldrev
702 # --------------- General references
705 # Called when any other type of reference is created (most likely a
708 generate_create_general_email()
710 echo " at $newrev ($newrev_type)"
712 generate_general_email
716 # Called when any other type of reference is updated (most likely a
719 generate_update_general_email()
721 echo " to $newrev ($newrev_type)"
724 generate_general_email
728 # Called for creation or update of any other type of reference
730 generate_general_email()
732 # Unannotated tags are more about marking a point than releasing a
733 # version; therefore we don't do the shortlog summary that we do for
734 # annotated tags above - we simply show that the point has been
735 # marked, and print the log message for the marked point for
738 # Note this section also catches any other reference type (although
739 # there aren't any) and deals with them in the same way.
742 if [ "$newrev_type" = "commit" ]; then
744 git diff-tree -s --always --encoding=UTF-8 --pretty=medium $newrev
747 # What can we do here? The tag marks an object that is not
748 # a commit, so there is no log for us to display. It's
749 # probably not wise to output git cat-file as it could be a
750 # binary blob. We'll just say how big it is
751 echo "$newrev is a $newrev_type, and is $(git cat-file -s $newrev) bytes long."
756 # Called for the deletion of any other type of reference
758 generate_delete_general_email()
763 git diff-tree -s --always --encoding=UTF-8 --pretty=oneline $oldrev
768 # --------------- Miscellaneous utilities
771 # Show new revisions as the user would like to see them in the email.
775 # This shows all log entries that are not already covered by
776 # another ref - i.e. commits that are now accessible from this
777 # ref that were previously not accessible
778 # (see generate_update_branch_email for the explanation of this
783 # Revision range passed to rev-list differs for new vs. updated
785 if [ "$change_type" = create ]
787 # Show all revisions exclusive to this (new) branch.
790 # Branch update; show revisions not part of $oldrev.
791 revspec=$oldrev..$newrev
794 git rev-parse --not "${other_branches[@]}" |
795 if [ -z "$custom_showrev" ]
797 git rev-list --pretty --stdin $revspec
799 git rev-list --stdin $revspec |
802 eval $(printf "$custom_showrev" $onerev)
812 while IFS="" read -r line; do
814 if [ $lines -gt $1 ]; then
815 skipped=$((skipped + 1))
817 printf "%s\n" "$line"
820 if [ $skipped -ne 0 ]; then
821 echo "... $skipped lines suppressed ..."
828 local x=$(cat; echo x)
831 [[ -n $x ]] || return 1
833 print -nr -- "$x" | if [ -n "$envelopesender" ]; then
834 /usr/sbin/sendmail -t -f "$envelopesender"
836 /usr/sbin/sendmail -t
840 # ---------------------------- main()
843 LOGBEGIN="- Log -----------------------------------------------------------------"
844 LOGEND="-----------------------------------------------------------------------"
847 # Set GIT_DIR either from the working directory, or from the environment
849 GIT_DIR=$(git rev-parse --git-dir 2>/dev/null)
850 if [ -z "$GIT_DIR" ]; then
851 echo >&2 "fatal: post-receive: GIT_DIR not set"
855 projectdesc=$(sed -ne '1p' "$GIT_DIR/description" 2>/dev/null)
856 # Check if the description is unchanged from it's default, and shorten it to
857 # a more manageable length if it is
858 if expr "$projectdesc" : "Unnamed repository.*$" >/dev/null
860 projectdesc="UNNAMED PROJECT"
863 recipients=$(git config hooks.mailinglist)
864 announcerecipients=$(git config hooks.announcelist)
865 envelopesender=$(git config hooks.envelopesender)
866 emailprefix=$(git config hooks.emailprefix)
867 custom_showrev=$(git config hooks.showrev)
868 maxlines=$(git config hooks.emailmaxlines)
869 diffopts=$(git config hooks.diffopts)
870 : "${diffopts:="-p --stat --summary --find-copies-harder"}"
871 kgbconffile=$(git config hooks.kgbconffile)
872 replyto=$(git config hooks.replyto)
873 shortdesc=$(git config hooks.shortdesc)
874 : "${shortdesc:=$projectdesc}"
877 # Allow dual mode: run from the command line just like the update hook, or
878 # if no arguments are given then run as a hook script
879 if [ -n "$1" -a -n "$2" -a -n "$3" ]; then
880 # Output to the terminal in command line mode - if someone wanted to
881 # resend an email; they could redirect the output to sendmail
883 prep_for_email $2 $3 $1 && PAGER= generate_email
885 # get a list of all branches
886 set -A other_branches -- $(git for-each-ref \
887 --format='%(refname)' refs/heads/)
889 while IFS= read -r line; do
892 # check if refname is a branch name
894 [[ $refname = refs/heads/* ]] || continue
895 # filter out from other_branches if matching
896 i=-1 j=${#other_branches[@]}
897 while (( ++i < j )); do
898 [[ ${other_branches[i]} = "$refname" ]] || continue
899 unset other_branches[i]
902 set -A other_branches -- "${other_branches[@]}"
904 # process one by one for eMails
905 for line in "${ilines[@]}"; do
910 prep_for_email $oldrev $newrev $refname || continue
911 generate_email $maxlines | send_mail
912 # append to list of branches for which eMails have been sent
913 [[ $refname = refs/heads/* ]] && other_branches+=("$refname")
915 if [[ -n $kgbconffile && -s $kgbconffile ]]; then
916 for line in "${ilines[@]}"; do
919 --conf "$kgbconffile" --repository git --git-reflog -
922 for uri in $(git config hooks.curltrigger); do
923 print -r -- "‣‣‣ $uri"