mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-30 16:10:23 +00:00
cli: remove redundant deduplication of branch names from cmd_git_push()
This commit is contained in:
parent
237dd98b87
commit
b1267cae4b
1 changed files with 0 additions and 8 deletions
|
@ -670,12 +670,8 @@ fn cmd_git_push(
|
||||||
let tx_description;
|
let tx_description;
|
||||||
let mut branch_updates = vec![];
|
let mut branch_updates = vec![];
|
||||||
if args.all || args.deleted {
|
if args.all || args.deleted {
|
||||||
let mut seen_branches = hashset! {};
|
|
||||||
// TODO: Is it useful to warn about conflicted branches?
|
// TODO: Is it useful to warn about conflicted branches?
|
||||||
for (branch_name, branch_target) in repo.view().branches() {
|
for (branch_name, branch_target) in repo.view().branches() {
|
||||||
if !seen_branches.insert(branch_name.clone()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let push_action = classify_branch_push_action(branch_target, &remote);
|
let push_action = classify_branch_push_action(branch_target, &remote);
|
||||||
match push_action {
|
match push_action {
|
||||||
BranchPushAction::AlreadyMatches
|
BranchPushAction::AlreadyMatches
|
||||||
|
@ -816,11 +812,7 @@ fn cmd_git_push(
|
||||||
if branches.is_empty() {
|
if branches.is_empty() {
|
||||||
return Err(user_error("No current branch."));
|
return Err(user_error("No current branch."));
|
||||||
}
|
}
|
||||||
let mut seen_branches = hashset! {};
|
|
||||||
for (branch_name, branch_target) in branches {
|
for (branch_name, branch_target) in branches {
|
||||||
if !seen_branches.insert(branch_name.clone()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let push_action = classify_branch_push_action(branch_target, &remote);
|
let push_action = classify_branch_push_action(branch_target, &remote);
|
||||||
match push_action {
|
match push_action {
|
||||||
BranchPushAction::AlreadyMatches
|
BranchPushAction::AlreadyMatches
|
||||||
|
|
Loading…
Reference in a new issue