Page MenuHomePhabricator

Arcanist creates a branch when --nobranch is specified
Closed, WontfixPublic

Description

"Created and checked out branch arcpatch-D8003."

It's confusing for users to see this. Please silence.

After digging through the code I see that it actually still does create a branch, it just doesn't leave it around.

I've got a fix that I'll submit for review if people feel this is a valid concern (https://github.com/aerickson/arcanist/tree/dont_create_branch_when_nobranch_given).

Thanks,
Andy


EX10622:~/code/magnus (master↓) > arc patch D8003 --nobranch --trace
libphutil loaded from '/usr/local/Cellar/arcanist/HEAD/libphutil/src'.
arcanist loaded from '/usr/local/Cellar/arcanist/HEAD/arcanist/src'.
Config: Reading user configuration file "/Users/aje/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Unable to find .arcconfig in any of these locations: /Users/aje/code/magnus/.arcconfig.
Working Copy: Path "/Users/aje/code/magnus" is part of `git` working copy "/Users/aje/code/magnus".
Working Copy: Project root is at "/Users/aje/code/magnus".
Config: Did not find local configuration at "/Users/aje/code/magnus/.git/arc/config".
>>> [0] <conduit> differential.getdiff() <bytes = 69>
>>> [1] <http> https://phabricator.MY_COMPANY_DOMAIN.com/api/differential.getdiff
<<< [1] <http> 622,697 us
<<< [0] <conduit> 622,956 us
>>> [2] <conduit> conduit.connect() <bytes = 491>
>>> [3] <http> https://phabricator.MY_COMPANY_DOMAIN.com/api/conduit.connect
<<< [3] <http> 271,595 us
<<< [2] <conduit> 271,826 us
>>> [4] <conduit> differential.getdiff() <bytes = 193>
>>> [5] <http> https://phabricator.MY_COMPANY_DOMAIN.com/api/differential.getdiff
<<< [5] <http> 444,730 us
<<< [4] <conduit> 444,937 us
>>> [6] <exec> $ git diff --no-ext-diff --no-textconv --raw 'HEAD' --
>>> [7] <exec> $ git ls-files --others --exclude-standard
<<< [7] <exec> 12,617 us
<<< [6] <exec> 15,679 us
>>> [8] <exec> $ git diff-files --name-only
<<< [8] <exec> 8,204 us
>>> [9] <exec> $ git show -s --format='%H' '84a9b6764938ec39c44effcf0411845798567dd2' --
<<< [9] <exec> 9,347 us
>>> [10] <exec> $ git branch --no-color
<<< [10] <exec> 9,094 us
>>> [11] <exec> $ git rev-parse --verify 'arcpatch-D8003'
<<< [11] <exec> 7,893 us
>>> [12] <exec> $ git show -s --format='%H' '84a9b6764938ec39c44effcf0411845798567dd2' --
<<< [12] <exec> 8,763 us
>>> [13] <exec> $ git checkout -b 'arcpatch-D8003' '84a9b6764938ec39c44effcf0411845798567dd2'
<<< [13] <exec> 24,156 us
Created and checked out branch arcpatch-D8003.
>>> [14] <exec> $ git show -s --format='%H' '84a9b6764938ec39c44effcf0411845798567dd2' --
<<< [14] <exec> 8,916 us
>>> [15] <exec> $ git apply --index --reject -- '/private/var/folders/1x/hry6xyvj3815tth1g8ldqjkc0000gn/T/212cj4wy0m3o40k0/35836-Ut6b0z'
Checking patch src/MY_COMPANY.com/ads/tools/auctiondiff/main.go...
Checking patch src/MY_COMPANY.com/ads/tools/auctiondiff/simulator.go...
Checking patch src/MY_COMPANY.com/ads/tools/auctionstream/main.go...
Checking patch src/MY_COMPANY.com/ads/tools/featurestream/main.go...
Checking patch src/MY_COMPANY.com/ml/model/example.go...
Applied patch src/MY_COMPANY.com/ads/tools/auctiondiff/main.go cleanly.
Applied patch src/MY_COMPANY.com/ads/tools/auctiondiff/simulator.go cleanly.
Applied patch src/MY_COMPANY.com/ads/tools/auctionstream/main.go cleanly.
Applied patch src/MY_COMPANY.com/ads/tools/featurestream/main.go cleanly.
Applied patch src/MY_COMPANY.com/ml/model/example.go cleanly.
<<< [15] <exec> 14,300 us
>>> [16] <exec> $ git submodule update --init --recursive
No submodule mapping found in .gitmodules for path 'src/github.com/nsf/gocode'
<<< [16] <exec> 65,250 us
>>> [17] <conduit> differential.getcommitmessage() <bytes = 193>
>>> [18] <http> https://phabricator.MY_COMPANY_DOMAIN.com/api/differential.getcommitmessage
<<< [18] <http> 736,257 us
<<< [17] <conduit> 736,433 us
>>> [19] <exec> $ git commit -a --author='Matt Jones <matt@MY_COMPANY.com>' -F - --no-verify
<<< [19] <exec> 47,624 us
>>> [20] <exec> $ git checkout 'master'
<<< [20] <exec> 28,555 us
>>> [21] <exec> $ git cherry-pick 'arcpatch-D8003'
<<< [21] <exec> 85,002 us
>>> [22] <exec> $ git branch -D 'arcpatch-D8003'
<<< [22] <exec> 10,187 us
 OKAY  Successfully committed patch.
EX10622:~/code/magnus (master↓) >

Event Timeline

defuzz raised the priority of this task from to Normal.
defuzz updated the task description. (Show Details)
defuzz added a project: Arcanist.
defuzz added a subscriber: defuzz.

$ arc --version
arcanist b7c370bcfc46018d1aae53dfc997ad7813db2482 (18 Dec 2014)
libphutil 2bdcb05951446265429cb0b74d7d7aa77d29ce47 (16 Dec 2014)

chad renamed this task from phabricator creates a branch when --nobranch is specified to Arcanist creates a branch when --nobranch is specified.Dec 18 2014, 3:57 AM
chad raised the priority of this task from Normal to Needs Triage.

Any thoughts on this bug? It's really confusing to users.

Thanks,
Andy

epriestley claimed this task.
epriestley added a subscriber: epriestley.

We haven't seen any other users find this confusing.

I forget the origins (it's been like a year), but Nick Zheng or a user at our company found this confusing.

FWIW, we have a script that uses arc patch --nobranch to "graft" someone else's working tree into your own working tree. We suppressed arc patch output entirely after enough people complained about "all of the branches its making".