-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sometimes I want to extract a small number of changes from a commit that touches loads of files. Since the cut mode prompts about every single file, there is no convenient way to do this. Teach --cut about pathspec arguments. This allows to use git revise --cut my-commit -- path/to/my/file a to extract to a separate commit all changes in the given file. In future we could support pathspecs in other subcommands.
- Loading branch information
Showing
5 changed files
with
96 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
from subprocess import CalledProcessError | ||
|
||
import pytest | ||
|
||
from gitrevise.odb import Repository | ||
|
||
from .conftest import main | ||
|
||
|
||
# pylint: disable=unused-argument | ||
def test_edit_illegal_extra_argument(repo: Repository) -> None: | ||
p = main(["--edit", "HEAD", "HEAD"], check=False, capture_output=True) | ||
assert b'error: unrecognized arguments' in p.stderr | ||
assert p.returncode != 0 | ||
process = main(["--edit", "HEAD", "HEAD"], check=False, capture_output=True) | ||
assert b"error: unrecognized arguments" in process.stderr | ||
assert process.returncode != 0 |