Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
OpenEdx
ansible
Commits
65413dc7
Commit
65413dc7
authored
Dec 04, 2012
by
Stephen Fromm
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1724 from sfromm/issue1722a
Further refine remote branch tracking in
b1ec6e81
parents
1d910bb4
1bcfdd94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
library/git
+8
-8
No files found.
library/git
View file @
65413dc7
...
@@ -197,14 +197,14 @@ def switch_version(module, dest, remote, version):
...
@@ -197,14 +197,14 @@ def switch_version(module, dest, remote, version):
os
.
chdir
(
dest
)
os
.
chdir
(
dest
)
cmd
=
''
cmd
=
''
if
version
!=
'HEAD'
:
if
version
!=
'HEAD'
:
if
not
is_local_branch
(
module
,
dest
,
version
)
and
is_remote_branch
(
module
,
dest
,
remote
,
version
):
if
is_remote_branch
(
module
,
dest
,
remote
,
version
):
cmd
=
"git checkout --track -b
%
s
%
s/
%
s"
%
(
version
,
remote
,
version
)
if
not
is_local_branch
(
module
,
dest
,
version
):
elif
is_local_branch
(
module
,
dest
,
version
):
cmd
=
"git checkout --track -b
%
s
%
s/
%
s"
%
(
version
,
remote
,
version
)
cmd
=
"git checkout --force
%
s"
%
version
else
:
(
rc
,
out
,
err
)
=
_run
(
"git checkout --force
%
s"
%
version
)
(
rc
,
out
,
err
)
=
_run
(
"git checkout --force
%
s"
%
version
)
if
rc
!=
0
:
if
rc
!=
0
:
module
.
fail_json
(
msg
=
"Failed to checkout branch
%
s"
%
version
)
module
.
fail_json
(
msg
=
"Failed to checkout branch
%
s"
%
version
)
cmd
=
"git reset --hard
%
s/
%
s"
%
(
remote
,
version
)
cmd
=
"git reset --hard
%
s/
%
s"
%
(
remote
,
version
)
else
:
else
:
cmd
=
"git checkout --force
%
s"
%
version
cmd
=
"git checkout --force
%
s"
%
version
else
:
else
:
...
...
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