-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
submit: warn if a branch's base is unsubmitted
Resolves #460
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
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,3 @@ | ||
kind: Fixed | ||
body: 'submit: Present a warning if submission might fail because of an unsubmitted base branch.' | ||
time: 2024-11-26T19:55:02.491968-08:00 |
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
35 changes: 35 additions & 0 deletions
35
testdata/script/issue460_branch_submit_unsubmitted_base.txt
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 @@ | ||
# branch submit presents a good message when the base branch for a CR | ||
# hasn't been submitted yet. | ||
# | ||
# https://github.com/abhinav/git-spice/issues/460 | ||
|
||
as 'Test <[email protected]>' | ||
at '2024-11-26T19:20:21Z' | ||
|
||
# setup | ||
cd repo | ||
git init | ||
git commit --allow-empty -m 'Initial commit' | ||
|
||
shamhub init | ||
shamhub new origin alice/example.git | ||
shamhub register alice | ||
git push origin main | ||
|
||
env SHAMHUB_USERNAME=alice | ||
gs auth login | ||
|
||
# set up main -> feat1 -> feat2 | ||
git add feat1.txt | ||
gs bc -m feat1 | ||
git add feat2.txt | ||
gs bc -m feat2 | ||
|
||
# attempt to submit feat2 | ||
! gs branch submit --fill | ||
stderr 'feat2: submit may fail: base feat1 has not been submitted' | ||
|
||
-- repo/feat1.txt -- | ||
feat 1 | ||
-- repo/feat2.txt -- | ||
feat 2 |