Repository navigation
Closed
Labels
P3Priority 3PlatformRelates to OS, containers, platform-based utilities like FS, system based appsState-Modulebugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
According to the documentation, from 2015.8 git.latest tries to unset the upstream branch if the specified rev is a tag. This is achieved with the --unset-upstream switch of git branch, which is unavailable before git 1.9.2. The default git package of Ubuntu 12.04 LTS version is bellow this.
Workaround suggested by @BABILEN is to add a patched _states/git.py with s/\['--unset-upstream']/None/' applied.
Reproducing:
# salt precise state.low '{"state": "git", "fun": "latest", "name": "https://github.com/saltstack/pepper.git", "rev": "0.1.0", "target": "/tmp/a"}'
precise:
----------
__run_num__:
0
changes:
----------
new:
https://github.com/saltstack/pepper.git => /tmp/a
comment:
error: unknown option `unset-upstream'
usage: git branch [options] [-r | -a] [--merged | --no-merged]
[...]
--merged <commit> print only merged branches
Changes already made: https://github.com/saltstack/pepper.git cloned to /tmp/a. Repository was reset to 0.1.0 (d7c2a24).
duration:
3434.94
name:
https://github.com/saltstack/pepper.git
result:
False
start_time:
15:51:08.117198
Metadata
Metadata
Assignees
Labels
P3Priority 3PlatformRelates to OS, containers, platform-based utilities like FS, system based appsState-Modulebugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
jfindlay commentedon Feb 8, 2016
@orymate, thanks for reporting.
fix git state github issue saltstack#30999
Merge pull request #31301 from terminalmage/issue30999
terminalmage commentedon Feb 18, 2016
This is fixed in #31301. Just FYI, I did some digging and found that
--unset-upstreamwas added in 1.8.0, not 1.9.2.wwentland commentedon Feb 18, 2016
Very nice, ta @terminalmage