Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vcsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
vcsh
Commits
83ae3460
Commit
83ae3460
authored
Aug 29, 2017
by
Richard Hartmann
Committed by
GitHub
Aug 29, 2017
Browse files
Options
Downloads
Plain Diff
Merge pull request #236 from lyda/git-version-bsd-fix
Fix version processing on BSD systems.
parents
978b5a89
b469b65f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
vcsh
+3
-3
3 additions, 3 deletions
vcsh
with
3 additions
and
3 deletions
vcsh
+
3
−
3
View file @
83ae3460
...
@@ -166,7 +166,7 @@ clone() {
...
@@ -166,7 +166,7 @@ clone() {
You should add files to your new repository."
You should add files to your new repository."
exit
exit
fi
fi
GIT_VERSION_MAJOR
=
$(
git
--version
|
sed
-n
's/.*
\
([0-9]
\+\
)\..*/\1/p'
)
GIT_VERSION_MAJOR
=
$(
git
--version
|
sed
-E
-n
's/.* ([0-9]
+
)\..*/\1/p'
)
if
[
1
-lt
"
$GIT_VERSION_MAJOR
"
]
;
then
if
[
1
-lt
"
$GIT_VERSION_MAJOR
"
]
;
then
git fetch origin
"
$VCSH_BRANCH
"
git fetch origin
"
$VCSH_BRANCH
"
else
else
...
@@ -482,8 +482,8 @@ write_gitignore() {
...
@@ -482,8 +482,8 @@ write_gitignore() {
use
use
cd
"
$VCSH_BASE
"
||
fatal
"could not enter '
$VCSH_BASE
'"
11
cd
"
$VCSH_BASE
"
||
fatal
"could not enter '
$VCSH_BASE
'"
11
local
GIT_VERSION
=
"
$(
git
--version
)
"
local
GIT_VERSION
=
"
$(
git
--version
)
"
local
GIT_VERSION_MAJOR
=
$(
echo
$GIT_VERSION
|
sed
-n
's/.*
\
([0-9]
\+\
)\..*/\1/p'
)
local
GIT_VERSION_MAJOR
=
$(
echo
$GIT_VERSION
|
sed
-E
-n
's/.* ([0-9]
+
)\..*/\1/p'
)
local
GIT_VERSION_MINOR
=
$(
echo
$GIT_VERSION
|
sed
-n
's/.*
\
([0-9]
\+\
)\.
\
([0-9]
\+\
)\..*/\2/p'
)
local
GIT_VERSION_MINOR
=
$(
echo
$GIT_VERSION
|
sed
-E
-n
's/.* ([0-9]
+
)\.([0-9]
+
)\..*/\2/p'
)
OLDIFS
=
$IFS
OLDIFS
=
$IFS
IFS
=
$(
printf
'\n\t'
)
IFS
=
$(
printf
'\n\t'
)
gitignores
=
$(
for
file
in
$(
git ls-files
)
;
do
gitignores
=
$(
for
file
in
$(
git ls-files
)
;
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment