1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-03-11 20:04:52 +01:00
phorge-arcanist/src/workflow/patch
epriestley 4e888458d7 In "arc patch", use "cat-file -t" instead of "rev-parse --verify" to check for commits.
Summary:
  - `git rev-parse --verify` "verifies" very valid-looking commit name, not just valid commit names.
  - Currently, if we can't find the base rev we'll incorrectly "verify" it and then fail on "git checkout -b <branch> <some bogus commit>".
  - Instead, use `git cat-file -t`.
  - See similar fix in D1590.

Example:

  $ git rev-parse --verify aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Test Plan: Ran "arc patch" in a mismatched local, hit "Y" to branch, got a branch off HEAD instead of an error.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1947
2012-03-19 19:11:52 -07:00
..
__init__.php Add "nocommit" git-only flag to arc patch workflow 2012-01-18 15:25:54 -08:00
ArcanistPatchWorkflow.php In "arc patch", use "cat-file -t" instead of "rev-parse --verify" to check for commits. 2012-03-19 19:11:52 -07:00