Git: Add search.

This commit is contained in:
Dmitry Voronin 2024-10-23 19:11:38 +03:00
parent ac10c3b9e6
commit acc699a567
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -224,6 +224,19 @@
open "''${url}"
}
# Search for string in whole git history.
# Usage: git_search <STRING>
function git_search() {
local target="''${*}"
if [[ "''${target}" = "" ]]; then
help git_search
return 2
fi
git log -p -S "''${target}"
}
# Sign the old commits. 0 to resign from root.
# Usage: git_sign [COMMIT_COUNT]
function git_sign() {