Currently, arc branch fails when not on a branch (for example, when detached from a branch for whatever reason).
> git checkout facebook/master > arc --trace branch libphutil loaded from '/home/joshua/dotfiles/modules/phabricator/libphutil/src'. arcanist loaded from '/home/joshua/dotfiles/modules/phabricator/arcanist/src'. Working Copy: Reading .arcconfig from "/home/joshua/workspace/github.com/facebook/arcanist/.arcconfig". Working Copy: Path "/home/joshua/workspace/github.com/facebook/arcanist" is part of `git` working copy "/home/joshua/workspace/github.com/facebook/arcanist". Working Copy: Project root is at "/home/joshua/workspace/github.com/facebook/arcanist". This is arcanist! Forcing this copy to run... >>> [0] <exec> $ ARC_PHUTIL_PATH='/home/joshua/dotfiles/modules/phabricator/libphutil' '/home/joshua/workspace/github.com/facebook/arcanist/bin/arc' '--trace' 'branch' libphutil loaded from '/home/joshua/dotfiles/modules/phabricator/libphutil/src'. arcanist loaded from '/home/joshua/workspace/github.com/facebook/arcanist/src'. Working Copy: Reading .arcconfig from "/home/joshua/workspace/github.com/facebook/arcanist/.arcconfig". Working Copy: Path "/home/joshua/workspace/github.com/facebook/arcanist" is part of `git` working copy "/home/joshua/workspace/github.com/facebook/arcanist". Working Copy: Project root is at "/home/joshua/workspace/github.com/facebook/arcanist". Loading phutil library from '/home/joshua/workspace/github.com/facebook/arcanist/src'... >>> [0] <conduit> conduit.connect() <bytes = 517> >>> [1] <http> https://secure.phabricator.com/api/conduit.connect <<< [1] <http> 1,511,623 us <<< [0] <conduit> 1,512,006 us >>> [2] <exec> $ git branch --no-color <<< [2] <exec> 5,213 us >>> [3] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b '(detached from facebook/master)' -- >>> [4] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'arcpatch-D4519' -- >>> [5] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'arcpatch-D6810' -- >>> [6] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'configuration' -- >>> [7] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'docblock_comments' -- >>> [8] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'external_linter_version' -- >>> [9] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'flags_as_array' -- >>> [10] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'lint_engine-final_methods' -- >>> [11] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'linter-final_methods' -- >>> [12] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'linter-test_method' -- >>> [13] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'master' -- >>> [14] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'spelling_data' -- >>> [15] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'tidying-linters' -- >>> [16] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'workflow-final_methods' -- >>> [17] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'xhpast-array_trailing_comma' -- >>> [18] <exec> $ git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b 'xhpast-double_quote' -- <<< [3] <exec> 25,476 us <<< [4] <exec> 24,607 us <<< [5] <exec> 23,294 us <<< [6] <exec> 21,626 us <<< [7] <exec> 17,563 us <<< [8] <exec> 15,295 us <<< [9] <exec> 13,203 us <<< [10] <exec> 11,836 us <<< [11] <exec> 10,664 us <<< [12] <exec> 10,935 us <<< [13] <exec> 10,370 us <<< [14] <exec> 9,613 us <<< [15] <exec> 8,713 us <<< [16] <exec> 10,060 us <<< [17] <exec> 10,358 us <<< [18] <exec> 9,566 us [2014-03-05 21:13:23] EXCEPTION: (CommandException) Command failed with error #128! COMMAND git show -s --format=%H%x01%ct%x01%T%x01%s%x01%s%n%n%b '(detached from facebook/master)' -- STDOUT (empty) STDERR fatal: bad revision '(detached from facebook/master)' at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/future/exec/ExecFuture.php:398] #0 ExecFuture::resolvex() called at [/home/joshua/workspace/github.com/facebook/arcanist/src/workflow/ArcanistFeatureWorkflow.php:207] #1 ArcanistFeatureWorkflow::loadCommitInfo(Array of size 16 starting with: { 0 => Array of size 2 starting with: { current => true } }) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/workflow/ArcanistFeatureWorkflow.php:95] #2 ArcanistFeatureWorkflow::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/src/workflow/ArcanistBranchWorkflow.php:36] #3 ArcanistBranchWorkflow::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/scripts/arcanist.php:321] <<< [0] <exec> 1,638,684 us