You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just accidentally mailed two fixup commits (e.g. https://go-review.googlesource.com/c/44857/1) instead of running git rw first. I wonder if mail should refuse to push a stack including fixup commits?
func TestDoNotMail(t *testing.T) {
gt := newGitTest(t)
defer gt.done()
gt.work(t)
trun(t, gt.client, "git", "commit", "--amend", "-m", "This is my commit.\n\nDO NOT MAIL\n")
testMainDied(t, "mail")
testPrintedStderr(t, "DO NOT MAIL")
trun(t, gt.client, "git", "commit", "--amend", "-m", "fixup! This is my commit.")
testMainDied(t, "mail")
testPrintedStderr(t, "fixup! commit")
trun(t, gt.client, "git", "commit", "--amend", "-m", "squash! This is my commit.")
testMainDied(t, "mail")
testPrintedStderr(t, "squash! commit")
trun(t, gt.client, "git", "commit", "--amend", "-m", "This is my commit.\n\nDO NOT MAIL\n")
// Do not mail even when the DO NOT MAIL is a parent of the thing we asked to mail.
gt.work(t)
testMainDied(t, "mail", "HEAD")
testPrintedStderr(t, "DO NOT MAIL")
}
I just accidentally mailed two fixup commits (e.g. https://go-review.googlesource.com/c/44857/1) instead of running git rw first. I wonder if mail should refuse to push a stack including fixup commits?
/cc @aclements
The text was updated successfully, but these errors were encountered: