Skip to content

Commit

Permalink
feat: add get_git_commit_short_sha
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Mar 15, 2024
1 parent 00985e2 commit d7b82a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,15 @@ get_git_commit_sha() {
cd ~-
}

# Returns the current git commit _short_ sha, always defined
# Arg1: the repository root
get_git_commit_short_sha() {
local REPO_ROOT="$1"
cd "$REPO_ROOT"
git rev-parse --short HEAD
cd ~-
}

# Returns the list of changed files between two commits
# Arg1: commit to (default to latest known)
# Arg2: commit from (defaults to the one before arg1)
Expand Down

0 comments on commit d7b82a3

Please sign in to comment.