Function: magit-blame-copy-hash

magit-blame-copy-hash is an interactive and byte-compiled function defined in magit-blame.el.

Signature

(magit-blame-copy-hash)

Documentation

Save hash of the current chunk's commit to the kill ring.

When the region is active, then save the region's content instead of the hash, like kill-ring-save would.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-blame.el
(defun magit-blame-copy-hash ()
  "Save hash of the current chunk's commit to the kill ring.

When the region is active, then save the region's content
instead of the hash, like `kill-ring-save' would."
  (interactive)
  (if (use-region-p)
      (call-interactively #'copy-region-as-kill)
    (kill-new (message "%s" (oref (magit-current-blame-chunk) orig-rev)))))