Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
1d166eaa
Unverified
Commit
1d166eaa
authored
Nov 10, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(cli): avoid `git -C` for compatibility with git < v1.8.5 (#10404)
parent
e3f7b8aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
cli.zsh
lib/cli.zsh
+7
-4
No files found.
lib/cli.zsh
View file @
1d166eaa
...
...
@@ -36,7 +36,7 @@ function _omz {
elif
((
CURRENT
==
3
))
;
then
case
"
$words
[2]"
in
changelog
)
local
-a
refs
refs
=(
"
${
(@f)
$(
c
ommand
git
-C
"
$ZSH
"
for
-each-ref
--format
=
"%(refname:short):%(subject)"
refs/heads refs/tags
)}
"
)
refs
=(
"
${
(@f)
$(
c
d
"
$ZSH
"
;
command
git
for
-each-ref
--format
=
"%(refname:short):%(subject)"
refs/heads refs/tags
)}
"
)
_describe
'command'
refs
;;
plugin
)
subcmds
=(
'disable:Disable plugin(s)'
...
...
@@ -171,9 +171,12 @@ EOF
function
_omz::changelog
{
local
version
=
${
1
:-
HEAD
}
format
=
${
3
:-
"--text"
}
if
!
command
git
-C
"
$ZSH
"
show-ref
--verify
refs/heads/
$version
&>/dev/null
&&
\
!
command
git
-C
"
$ZSH
"
show-ref
--verify
refs/tags/
$version
&>/dev/null
&&
\
!
command
git
-C
"
$ZSH
"
rev-parse
--verify
"
${
version
}
^{commit}"
&>/dev/null
;
then
if
(
cd
"
$ZSH
"
!
command
git show-ref
--verify
refs/heads/
$version
&&
\
!
command
git show-ref
--verify
refs/tags/
$version
&&
\
!
command
git rev-parse
--verify
"
${
version
}
^{commit}"
)
&>/dev/null
;
then
cat
>
&2
<<
EOF
Usage: omz changelog [version]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment