-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove parent info of children of deleted perennial branches (#2540)
- Loading branch information
Showing
2 changed files
with
54 additions
and
15 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
features/prune_branches/features/perennial_branch_with_children.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Feature: remove parent info of children of deleted perennial branches | ||
|
||
Background: | ||
Given the perennial branches "old" and "other" | ||
And a feature branch "old1" as a child of "old" | ||
And a feature branch "old2" as a child of "old" | ||
And a feature branch "other1" as a child of "other" | ||
And origin deletes the "old" branch | ||
And the current branch is "old" | ||
When I run "git-town prune-branches" | ||
|
||
Scenario: result | ||
Then it runs the commands | ||
| BRANCH | COMMAND | | ||
| old | git fetch --prune --tags | | ||
| | git checkout main | | ||
| main | git branch -d old | | ||
And the current branch is now "main" | ||
And the branches are now | ||
| REPOSITORY | BRANCHES | | ||
| local, origin | main, old1, old2, other, other1 | | ||
And the perennial branches are now "other" | ||
And this branch lineage exists now | ||
| BRANCH | PARENT | | ||
| other1 | other | | ||
|
||
Scenario: undo | ||
When I run "git-town undo" | ||
Then it runs the commands | ||
| BRANCH | COMMAND | | ||
| main | git branch old {{ sha 'Initial commit' }} | | ||
| | git checkout old | | ||
And the current branch is now "old" | ||
And the initial branches and hierarchy exist | ||
And the perennial branches are now "old" and "other" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters