]> khamidou — GitHub mirrors - arcanist.git/commit
Allow running `arc diff` without `git commit`
authorvrana <jakubv@fb.com>
Thu, 15 Nov 2012 20:33:36 +0000 (12:33 -0800)
committervrana <jakubv@fb.com>
Mon, 19 Nov 2012 20:06:03 +0000 (12:06 -0800)
commit22d8e7467b24f47168f0b563c0c58bff6bc4d6ee
tree3a7cb320b6c5dda12f7e6bfa90d2fa4410bf1747
parentf4222b3c8b8e01a28113085e12ca3f57b1974882
Allow running `arc diff` without `git commit`

Summary:
There's quite some logic in here:

- It automatically decides whether to create a new commit or amend.
- It partially respects 'default-relative-commit'.
- However if it points to a closed revision then it creates a new commit.

Resolves T2025.

Test Plan:
`arc diff` on:

- Clean committed repository.
- Dirty repository without commit since 'default-relative-commit'.
- Dirty repository with non-revision commit since 'default-relative-commit'.
- Dirty repository with revision commit since 'default-relative-commit'.
- `arc diff HEAD^` on dirty repository on top of closed revision.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin
Maniphest Tasks: T2025

Differential Revision: https://secure.phabricator.com/D3967
src/repository/api/ArcanistGitAPI.php
src/repository/api/ArcanistMercurialAPI.php
src/repository/api/ArcanistRepositoryAPI.php
src/repository/api/ArcanistSubversionAPI.php
src/workflow/ArcanistBaseWorkflow.php
src/workflow/ArcanistDiffWorkflow.php