File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ impl Forge for PhabricatorForge<'_> {
241
241
fn query_status (
242
242
& mut self ,
243
243
commit_set : CommitSet ,
244
- ) -> eyre :: Result < std :: result :: Result < HashMap < NonZeroOid , CommitStatus > , ExitCode > > {
244
+ ) -> EyreExitOr < HashMap < NonZeroOid , CommitStatus > > {
245
245
let commit_oids = self . dag . commit_set_to_vec ( & commit_set) ?;
246
246
let commit_oid_to_revision: HashMap < NonZeroOid , Option < Id > > = commit_oids
247
247
. into_iter ( )
@@ -319,7 +319,7 @@ impl Forge for PhabricatorForge<'_> {
319
319
& mut self ,
320
320
commits : HashMap < NonZeroOid , CommitStatus > ,
321
321
options : & SubmitOptions ,
322
- ) -> eyre :: Result < std :: result :: Result < HashMap < NonZeroOid , CreateStatus > , ExitCode > > {
322
+ ) -> EyreExitOr < HashMap < NonZeroOid , CreateStatus > > {
323
323
let SubmitOptions {
324
324
create : _,
325
325
draft,
@@ -371,7 +371,9 @@ impl Forge for PhabricatorForge<'_> {
371
371
TestCommand :: Args ( args. into_iter ( ) . map ( ToString :: to_string) . collect ( ) )
372
372
} else {
373
373
TestCommand :: String (
374
- r#"(git show | grep 'BROKEN') && exit 1 || git commit --amend --message "$(git show --no-patch --format=%B HEAD)
374
+ // Convoluted way to check if the commit message contains the
375
+ // given string without a dependency on `grep`, etc.
376
+ r#"[ "$(git log --max-count=1 HEAD^..HEAD --grep='BROKEN')" != '' ] && exit 1 || git commit --amend --message "$(git show --no-patch --format=%B HEAD)
375
377
376
378
Differential Revision: https://phabricator.example.com/D000$(git rev-list --count HEAD)
377
379
"
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ fn test_submit_phabricator_failure_commit() -> eyre::Result<()> {
265
265
Stopped at d5bb8b5 (create test3.txt)
266
266
branchless: processing 1 update: ref HEAD
267
267
"### ) ;
268
- insta:: assert_snapshot!( stdout, @r### "
268
+ insta:: assert_snapshot!( stdout, @r"
269
269
branchless: running command: <git-executable> diff --quiet
270
270
Calling Git for on-disk rebase...
271
271
branchless: running command: <git-executable> rebase --continue
@@ -274,7 +274,6 @@ fn test_submit_phabricator_failure_commit() -> eyre::Result<()> {
274
274
branchless: running command: <git-executable> rebase --abort
275
275
Failed (exit code 1): 5b9de4b BROKEN: test2.txt
276
276
Stdout:
277
- BROKEN: test2.txt
278
277
Stderr:
279
278
Attempting rebase in-memory...
280
279
[1/3] Committed as: 55af3db create test1.txt
@@ -293,7 +292,7 @@ fn test_submit_phabricator_failure_commit() -> eyre::Result<()> {
293
292
Failed to create 2 commits:
294
293
5b9de4b BROKEN: test2.txt
295
294
e9d3664 create test3.txt
296
- "### ) ;
295
+ " ) ;
297
296
}
298
297
299
298
{
You can’t perform that action at this time.
0 commit comments