DescriptionOnly add unstaged baseline changes to the git index when rebaselining.
Reason: Currently rebaseline-cl will add all files in LayoutTests/ to the index even if they are files unrelated to rebaseline-cl.
In this CL:
- In git.py, add a method unstaged_changes() which just lists currently unstaged changes. There were already methods for listing files that are different from HEAD; that includes staged changes, but I believe we don't want to abort if there are already staged changes to baselines, right? If that's not the case, then this CL could potentially be made simpler.
- In rebaseline.py, add a method unstaged_baselines(), which just lists unstaged changes to baselines. Additionally, when adding files after rebaselining, only add staged baselines to the git index, not other files.
- In rebaseline_cl.py, add a check for unstaged baselines at the start and abort with an error message if there are any.
BUG=662584
Committed: https://crrev.com/99b0e4f3108df37cae3ed6664ca6f14b8a1fd056
Cr-Commit-Position: refs/heads/master@{#440830}
Patch Set 1 #Patch Set 2 : rebaseline-cl: Abort if there are unstaged baseline changes. #Messages
Total messages: 16 (11 generated)
|