summaryrefslogtreecommitdiff
path: root/themes/wedisagree.zsh-theme
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2022-02-19 17:12:23 -0600
committerTuowen Zhao <ztuowen@gmail.com>2022-02-19 17:12:23 -0600
commitcae9a2b797649379e865e6bd73bc67e294e4ac77 (patch)
tree481419eff4bc761c3ca516704427394193473419 /themes/wedisagree.zsh-theme
parent49edbf438ed690c76e6b2af80368c59404cf0167 (diff)
parent3427da4057dbe302933a7b5b19b4e23bfb9d0969 (diff)
downloadzsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.tar.gz
zsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.tar.bz2
zsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'themes/wedisagree.zsh-theme')
-rw-r--r--themes/wedisagree.zsh-theme4
1 files changed, 1 insertions, 3 deletions
diff --git a/themes/wedisagree.zsh-theme b/themes/wedisagree.zsh-theme
index 07006ecd9..e9e9d6ef8 100644
--- a/themes/wedisagree.zsh-theme
+++ b/themes/wedisagree.zsh-theme
@@ -69,9 +69,7 @@ function rvm_gemset() {
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 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; 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))