fix(park): park from a CRLF diff and say that a staged new file is parked
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
bf4736a254
commit
afe56899a9
4 changed files with 59 additions and 6 deletions
|
|
@ -7,10 +7,10 @@
|
|||
// rejected line would have passed Verify, the manifest and the success
|
||||
// criterion. Only the plan critic caught it.
|
||||
//
|
||||
// Before the fresh build the executor parks them: every file the attempt
|
||||
// created (a `new file mode` entry in step-{N}-upward.diff) that is still
|
||||
// untracked on disk moves to <git dir>/voyage/parked/step-<N>-attempt-<k>/
|
||||
// under its own path. The git dir, like the test lock's, is outside the work
|
||||
// Before the fresh build the executor parks them: it parks every file new in
|
||||
// the attempt's diff (a `new file mode` entry in step-{N}-upward.diff) that is
|
||||
// untracked, or staged but not in HEAD; it moves to
|
||||
// <git dir>/voyage/parked/step-<N>-attempt-<k>/ under its own path. The git dir, like the test lock's, is outside the work
|
||||
// tree, so a parked file never comes back as a new file of the next build.
|
||||
// Moved, never deleted, and never over a file already parked there.
|
||||
// A new file the helper registered --intent-to-add is in the index, not in
|
||||
|
|
@ -56,7 +56,7 @@ export function newFilesInDiff(diffText) {
|
|||
const unread = [];
|
||||
let header = null;
|
||||
let sawHeader = false;
|
||||
const lines = String(diffText).split('\n').map((l) => l.replace(ANSI_RE, ''));
|
||||
const lines = String(diffText).split(/\r?\n/).map((l) => l.replace(ANSI_RE, ''));
|
||||
for (const line of lines) {
|
||||
if (line.startsWith('diff --git ')) {
|
||||
sawHeader = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue