Function: magit-blame-copy-hash

magit-blame-copy-hash is an interactive and natively 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

magit-blame-read-only-mode-map M-w

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/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)))))