diff --git a/git_common.py b/git_common.py index 86a571e2f..cd60bf66c 100644 --- a/git_common.py +++ b/git_common.py @@ -502,7 +502,7 @@ def freeze(): return ' '.join(ret) or None -def get_branch_tree(): +def get_branch_tree(use_limit=False): """Get the dictionary of {branch: parent}, compatible with topo_iter. Returns a tuple of (skipped, ) where skipped is a set of @@ -511,7 +511,7 @@ def get_branch_tree(): skipped = set() branch_tree = {} - for branch in branches(): + for branch in branches(use_limit=use_limit): parent = upstream(branch) if not parent: skipped.add(branch) diff --git a/git_rebase_update.py b/git_rebase_update.py index c4dbd2f91..e557ab12a 100755 --- a/git_rebase_update.py +++ b/git_rebase_update.py @@ -268,7 +268,7 @@ def main(args=None): if opts.current: branches_to_rebase.add(git.current_branch()) - skipped, branch_tree = git.get_branch_tree() + skipped, branch_tree = git.get_branch_tree(use_limit=not opts.current) if branches_to_rebase: skipped = set(skipped).intersection(branches_to_rebase) for branch in skipped: @@ -321,7 +321,7 @@ def main(args=None): remove_empty_branches(branch_tree) # return_branch may not be there any more. - if return_branch in git.branches(): + if return_branch in git.branches(use_limit=False): git.run('checkout', return_branch) git.thaw() else: