@evanpurkhiser/tooling-personal 1.52.0 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cherry-pick.js +7 -9
- package/package.json +1 -1
package/dist/cherry-pick.js
CHANGED
|
@@ -31,16 +31,14 @@ async function buildPickError(git, sha, base, baseSha, parentSha, conflictLines)
|
|
|
31
31
|
'--',
|
|
32
32
|
...conflictFiles,
|
|
33
33
|
])).trim();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`${count} earlier local commit(s) changed those file(s); ` +
|
|
39
|
-
`one or more is the source of the conflict and must be on the remote ` +
|
|
40
|
-
`before a PR can be opened:\n${candidateLog}`);
|
|
34
|
+
const fileList = conflictFiles.map(file => `- ${file}`).join('\n');
|
|
35
|
+
const header = `Cannot cherry-pick ${sha.slice(0, 8)} onto tip of ${base}, merge conflicts in:\n${fileList}`;
|
|
36
|
+
if (!candidateLog) {
|
|
37
|
+
return new Error(header);
|
|
41
38
|
}
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
const candidates = candidateLog.split('\n');
|
|
40
|
+
const candidateList = candidates.map(line => `- ${line}`).join('\n');
|
|
41
|
+
return new Error(`${header}\n\n${candidates.length} earlier local commit(s) changed those file(s):\n${candidateList}`);
|
|
44
42
|
}
|
|
45
43
|
/**
|
|
46
44
|
* Build a commit object equivalent to cherry-picking `sha` onto `base`, without
|
package/package.json
CHANGED