Function: ibtypes::git-commit-reference

ibtypes::git-commit-reference is a byte-compiled function defined in hib-social.el.

Signature

(ibtypes::git-commit-reference)

Documentation

Display the changeset for a commit reference typically produced by git log.

A git commit reference has the form "commit a55e21".

Hyperbole also includes two commands, hypb:fgrep-git-log and hypb:grep-git-log to list git commit references whose changesets contain either the string (fgrep) or regular expression (grep) given. Then an Action Key displays the associated changeset.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hib-social.el
;;; Local git repository commit references

(defib git-commit-reference ()
  "Display the changeset for a commit reference typically produced by git log.
A git commit reference has the form \"commit a55e21\".

Hyperbole also includes two commands, `hypb:fgrep-git-log' and
`hypb:grep-git-log' to list git commit references whose changesets
contain either the string (fgrep) or regular expression (grep) given.
Then an Action Key displays the associated changeset."
  (when (save-excursion
	  (beginning-of-line)
	  (looking-at "\\(^\\|\\s-+\\)\\(commit #?\\([0-9a-f][0-9a-f][0-9a-f][0-9a-f]+\\)\\)\\(\\s-\\|$\\)"))
    (save-match-data
      (ibut:label-set (match-string-no-properties 2) (match-beginning 2) (match-end 2)))
    (hact #'git-reference (match-string-no-properties 3))))