Home GnuPG

If the base commit for `arc patch` does not exist locally, try to fetch it
129d51fa0936Unpublished

Unpublished Commit ยท Learn More

Publishing Disabled: All publishing is disabled for this repository.

Description

If the base commit for arc patch does not exist locally, try to fetch it

Summary:
If the commit does not exist locally, aborting still leaves
the user checked out on the branch. In nearly all cases, all that is
necessary is a fetch -- but the branch must also be cleaned up. This
leads to the pattern of:

arc patch D12345
[...base commit does not exist...]
^C
git checkout master
git branch -D arcpatch-D12345
git fetch
arc patch D12345

Solve this common problem by simply trying to fetch once if the commit does not
exist locally.

Test Plan: Ran arc patch on a recent diff.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D17949

Details

Provenance
Alex Vandiver <alexmv@dropbox.com>Authored on May 18 2017, 6:09 PM
marcusPushed on May 29 2017, 4:22 PM
Parents
rARC3c4735795a29: Detect trailing spaces and tabs
Branches
Unknown
Tags
Unknown

Event Timeline

Alex Vandiver <alexmv@dropbox.com> committed rARC129d51fa0936: If the base commit for `arc patch` does not exist locally, try to fetch it (authored by Alex Vandiver <alexmv@dropbox.com>).May 18 2017, 7:13 PM