mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
fix: disable log.showSignature in git log calls
This commit is contained in:
parent
971683762e
commit
9c84c344d7
7 changed files with 7 additions and 15 deletions
|
|
@ -37,9 +37,7 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
|
|||
function git_time_since_commit() {
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
# Only proceed if there is actually a commit.
|
||||
if git log -n 1 > /dev/null 2>&1; then
|
||||
# Get the last commit.
|
||||
last_commit=`git log --pretty=format:'%at' -1 2> /dev/null`
|
||||
if last_commit=`git -c log.showSignature=false log --pretty=format:'%at' -1 2> /dev/null`; then
|
||||
now=`date +%s`
|
||||
seconds_since_last_commit=$((now-last_commit))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue