When in a detached HEAD state,
arc land pushes the code upstream without issue but fails when it tries to clean up the branch, exiting with a nonzero exit code. This breaks certain workflows, i.e. stacked diffs with an interactive rebase to land one or more of the deeper diffs.
arc land --keep-branch is a workaround but it seems it would be sensible for
arc to check that we’re on a branch before trying to be helpful in deleting what it assumes is a branch.
$ git checkout -b my-branch $ echo burek > sarma.txt $ git add sarma.txt $ git commit -m 'Add sarma.txt' $ arc diff ... $ git checkout $(git rev-parse HEAD) $ arc land ... successful push then ... Cleaning up branch "0550804fa452568c8cf20f623dc3fcfb058704da"... (Use `git checkout -b 0550804fa452568c8cf20f623dc3fcfb058704da 0550804fa452568c8cf20f623dc3fcfb058704da` if you want it back.) Exception Command failed with error #1! COMMAND git branch -D -- '0550804fa452568c8cf20f623dc3fcfb058704da' STDOUT (empty) STDERR error: branch '0550804fa452568c8cf20f623dc3fcfb058704da' not found. (Run with `--trace` for a full exception trace.)
$ arc version arcanist feb5f4d42c4fe0001e76428e80d5e88262308802 (22 Jun 2019) libphutil 794ded9857110cdc7b0fb7bedb4a64438d2d873e (31 Aug 2019)