Fix a regression with rbt patch --write/--print, plus a newline fix.
Review Request #14247 — Created Nov. 13, 2024 and submitted
When setting up state for
rbt patch
, we only query local repository
information if we're going to be applying patches. If we're just
fetching a patch for display or to output to a file, we skip this step.
This then breaks due to an expectation that that state has been set.We're now more careful about the checks and assumptions surrounding the
repository state, ensuring both cases will work.There's also a fix for an extra newline that would appear in the patch
output. We no longer unconditionally output a newline after outputting a
patch. Instead, we only output one if the patch does not contain one.
Tested
rbt patch
,rbt patch --write
, andrbt patch --print
.Verified the extra newline is gone.
Summary | ID |
---|---|
a6708302d2637134ebeabc8aa22509e542c86980 |
Description | From | Last Updated |
---|---|---|
We could pull out patch.content into a variable. |
maubin |