mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 01:48:34 -07:00
fix: disable log.showSignature
in git log
calls
This commit is contained in:
parent
971683762e
commit
9c84c344d7
@ -24,9 +24,7 @@ compdef _git _git_log_prettily=git-log
|
||||
|
||||
# Warn if the current branch is a WIP
|
||||
function work_in_progress() {
|
||||
if $(git log -n 1 2>/dev/null | grep -q -c "\-\-wip\-\-"); then
|
||||
echo "WIP!!"
|
||||
fi
|
||||
command git -c log.showSignature=false log -n 1 2>/dev/null | grep -q -- "--wip--" && echo "WIP!!"
|
||||
}
|
||||
|
||||
# Check if main exists and use instead of master
|
||||
|
@ -45,9 +45,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))
|
||||
|
||||
|
@ -31,7 +31,7 @@ function _git_time_since_commit() {
|
||||
local last_commit now seconds_since_last_commit
|
||||
local minutes hours days years commit_age
|
||||
# Only proceed if there is actually a commit.
|
||||
if last_commit=$(command git -c log.showSignatures=false log --format='%at' -1 2>/dev/null); then
|
||||
if last_commit=$(command git -c log.showSignature=false log --format='%at' -1 2>/dev/null); then
|
||||
now=$(date +%s)
|
||||
seconds_since_last_commit=$((now-last_commit))
|
||||
|
||||
|
@ -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))
|
||||
|
||||
|
@ -40,7 +40,7 @@ function git_time_since_commit() {
|
||||
local last_commit seconds_since_last_commit
|
||||
|
||||
# Only proceed if there is actually a commit
|
||||
if ! last_commit=$(command git log --pretty=format:'%at' -1 2>/dev/null); then
|
||||
if ! last_commit=$(command git -c log.showSignature=false log --pretty=format:'%at' -1 2>/dev/null); then
|
||||
echo "[$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL~%{$reset_color%}]"
|
||||
return
|
||||
fi
|
||||
|
@ -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))
|
||||
|
||||
|
@ -414,7 +414,7 @@ function main {
|
||||
# --first-parent: commits from merged branches are omitted
|
||||
local SEP="0mZmAgIcSeP"
|
||||
local -a raw_commits
|
||||
raw_commits=(${(0)"$(command git log -z \
|
||||
raw_commits=(${(0)"$(command git -c log.showSignature=false log -z \
|
||||
--format="%h${SEP}%D${SEP}%s${SEP}%b" --abbrev=7 \
|
||||
--no-merges --first-parent $range)"})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user