forked from M-Labs/artiq
versioneer: cut git hashes consistently (#753)
This commit is contained in:
parent
6c6bb67618
commit
d08bd58dff
|
@ -235,7 +235,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
|
||||||
# if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]
|
# if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]
|
||||||
# if there isn't one, this yields HEX[-dirty] (no NUM)
|
# if there isn't one, this yields HEX[-dirty] (no NUM)
|
||||||
describe_out, rc = run_command(GITS, ["describe", "--tags", "--dirty",
|
describe_out, rc = run_command(GITS, ["describe", "--tags", "--dirty",
|
||||||
"--always", "--long",
|
"--always", "--long", "--abbrev=8",
|
||||||
"--match", "%s*" % tag_prefix],
|
"--match", "%s*" % tag_prefix],
|
||||||
cwd=root)
|
cwd=root)
|
||||||
# --long was added in git-1.5.5
|
# --long was added in git-1.5.5
|
||||||
|
@ -249,7 +249,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
|
||||||
|
|
||||||
pieces = {}
|
pieces = {}
|
||||||
pieces["long"] = full_out
|
pieces["long"] = full_out
|
||||||
pieces["short"] = full_out[:7] # maybe improved later
|
pieces["short"] = full_out[:8] # maybe improved later
|
||||||
pieces["error"] = None
|
pieces["error"] = None
|
||||||
|
|
||||||
# parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]
|
# parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]
|
||||||
|
|
|
@ -1061,7 +1061,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
|
||||||
|
|
||||||
pieces = {}
|
pieces = {}
|
||||||
pieces["long"] = full_out
|
pieces["long"] = full_out
|
||||||
pieces["short"] = full_out[:7] # maybe improved later
|
pieces["short"] = full_out[:8] # maybe improved later
|
||||||
pieces["error"] = None
|
pieces["error"] = None
|
||||||
|
|
||||||
# parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]
|
# parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]
|
||||||
|
|
Loading…
Reference in New Issue