@@ -230,6 +230,9 @@ describe('ensureSharedHistory', () => {
230230
231231 it ( 'deepens history if needed' , ( ) => {
232232 const repo = repositoryFactory . cloneRepository ( { depth : 2 , branch : testBranch , singleBranch : true } ) ;
233+
234+ expect ( workspaceTools . getDefaultRemoteBranch ( { cwd : repo . rootPath } ) ) . toEqual ( defaultRemoteBranchName ) ;
235+ logs . clear ( ) ;
233236 gitSpy . mockClear ( ) ;
234237
235238 ensureSharedHistory ( {
@@ -241,7 +244,28 @@ describe('ensureSharedHistory', () => {
241244 verbose : true ,
242245 } ) ;
243246
244- const allLogs = logs . getMockLines ( 'all' ) ;
247+ const allLogs = logs . getMockLines ( 'all' , {
248+ replacePaths : { [ repo . rootPath ] : '<repo-root>' , [ repositoryFactory . originRoot ] : '<origin-root>' } ,
249+ } ) ;
250+ expect ( allLogs ) . toMatchInlineSnapshot ( `
251+ "[log] Adding branch "master" to fetch config for remote "origin"
252+ [log] Fetching branch "master" from remote "origin" (with --depth=2)...
253+ [log] From <origin-root>
254+ * branch master -> FETCH_HEAD
255+ * [new branch] master -> origin/master
256+ [log] Fetching branch "master" from remote "origin" (with --depth=2) completed successfully
257+ [log] This is a shallow clone. Deepening to check for changes...
258+ [log] Deepening by 2 more commits (attempt 1/3)...
259+ [log] Fetching branch "master" from remote "origin" (with --deepen=2)...
260+ [log] From <origin-root>
261+ * branch master -> FETCH_HEAD
262+ [log] Fetching branch "master" from remote "origin" (with --deepen=2) completed successfully
263+ [log] Deepening by 2 more commits (attempt 2/3)...
264+ [log] Fetching branch "master" from remote "origin" (with --deepen=2)...
265+ [log] From <origin-root>
266+ * branch master -> FETCH_HEAD
267+ [log] Fetching branch "master" from remote "origin" (with --deepen=2) completed successfully"
268+ ` ) ;
245269 expect ( allLogs ) . toMatch ( 'Adding branch "master" to fetch config for remote "origin"' ) ;
246270 expect ( allLogs ) . toMatch ( 'This is a shallow clone. Deepening to check for changes...' ) ;
247271 expect ( allLogs ) . toMatch ( 'Deepening by 2 more commits (attempt 1/3)...' ) ;
0 commit comments