mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 20:13:05 +03:00
Fix git error when in repository with no commits
This commit is contained in:
parent
8b5a815cb8
commit
12da651992
@ -1,7 +1,8 @@
|
||||
function _tide_item_git
|
||||
# Branch or SHA
|
||||
set -l location (git branch --show-current 2>/dev/null) || return
|
||||
git rev-parse --git-dir --short=8 HEAD | read --local --line gitDir sha
|
||||
# Repository might not have any commits, in which case this would error
|
||||
git rev-parse --git-dir --short=8 HEAD 2>/dev/null | read --local --line gitDir sha
|
||||
|
||||
# Operation
|
||||
set -l operation
|
||||
|
Loading…
Reference in New Issue
Block a user