1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02:00
No description
Find a file
Edward Speyer f0c0245957 Support --nobranch when not currently on a branch
Summary:
This is horrible and git specific, but fixes a case where people are using "arc
patch --nobranch ..." when they're not currently on a branch.

The old code assumed you were on a branch and used getBranchName() to record
this, in order to return to that branch later and cherry-pick the patch.

When not on a branch, and using arc patch --nobranch, this was trying to return
to the branch '(no branch)'.

Now, I detect that we're not on a branch and just record what HEAD is instead.

Test Plan:
Checkout the SHA of master (so I'm on master, but not on a branch) then try to
patch it with a feature diff:

  € git checkout e7a3ec68159d6847372cab5ad913f2f15aa7c249
  Warning: you are leaving 1 commit behind, not connected to
  any of your branches:

    ac1ad39 Updating a-file

  If you want to keep them by creating a new branch, this may be a good time
  to do so with:

   git branch new_branch_name ac1ad392350a51edd10343f12b9713f5e5b3707c

  HEAD is now at e7a3ec6... Fix arcconfig

  € arc patch --nobranch D7
  Created and checked out branch arcpatch-D7.
   OKAY  Successfully committed patch.

  € git branch
  * (no branch)
    feature
    haddock
    master

  € git log --oneline | head -2
  38c0235 Updating a-file
  e7a3ec6 Fix arcconfig

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3743
2012-10-19 12:12:57 -07:00
bin Make bin/arc less linux-centered, more UNIX-agnostic 2012-07-03 06:34:49 -07:00
externals Allow arcanist to search for libphutil in externals/includes/ 2012-08-10 14:58:19 -07:00
resources Lint functions not available on Windows on PHP 5.2 2012-09-17 13:51:06 -07:00
scripts Fix typo in comment 2012-10-16 10:01:38 -07:00
src Support --nobranch when not currently on a branch 2012-10-19 12:12:57 -07:00
.arcconfig Tweak severity of pht() linter 2012-09-12 10:29:37 -07:00
.divinerconfig Make the "this is technical documentation" message of "Arcanist Overview" more clear 2012-08-10 11:37:30 -07:00
.gitignore Allow arcanist to search for libphutil in externals/includes/ 2012-08-10 14:58:19 -07:00
LICENSE Initial commit. 2011-01-09 15:22:25 -08:00
README Update Arcanist README text 2011-11-06 18:12:50 -08:00

WHAT IS ARCANIST?

Arcanist is the command-line tool for Phabricator. It allows you to interact
with Phabricator installs to send code for review, download patches, transfer
files, view status, make API calls, and various other things. You can find
a complete user guide here:

  http://www.phabricator.com/docs/phabricator/article/Arcanist_User_Guide.html

For more information about Phabricator, see:

  http://phabricator.org/