stgit.common.git_id() was modified to add '^0' to the revision so that a
tag can be used for different operations and the corresponding commit will
be returned. Commands like 'branch --create' were failing if a tag was
passed.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
tree_id = None
if len(args) == 2:
- tree_id = args[1]
+ tree_id = git_id(args[1])
git.create_branch(args[0], tree_id)
stack.Series(args[0]).init()
return read_string(series.get_base_file())
# anything else failed
- return git.rev_parse(rev)
+ return git.rev_parse(rev + '^{commit}')
def check_local_changes():
if git.local_changes():
if not branch_exists(new_head):
raise GitException, 'Branch "%s" does not exist' % name
- tree_id = rev_parse(new_head + '^0')
+ tree_id = rev_parse(new_head + '^{commit}')
if tree_id != get_head():
refresh_index()
if __run('git-read-tree -u -m', [get_head(), tree_id]) != 0: