@@ -157,7 +157,7 @@ export class GitManager {
157
157
*/
158
158
async listCommits ( maxRetries = 2 ) : Promise < GitCommit [ ] > {
159
159
let lastError : Error | null = null ;
160
-
160
+
161
161
for ( let attempt = 0 ; attempt <= maxRetries ; attempt ++ ) {
162
162
try {
163
163
// Use a more robust format with unique separators and handle multiline messages
@@ -171,7 +171,7 @@ export class GitManager {
171
171
172
172
// If git command failed but didn't throw, treat as error for retry logic
173
173
lastError = new Error ( `Git command failed: ${ result . error || 'Unknown error' } ` ) ;
174
-
174
+
175
175
if ( attempt < maxRetries ) {
176
176
// Wait before retry with exponential backoff
177
177
await new Promise ( resolve => setTimeout ( resolve , Math . pow ( 2 , attempt ) * 100 ) ) ;
@@ -182,18 +182,18 @@ export class GitManager {
182
182
} catch ( error ) {
183
183
lastError = error instanceof Error ? error : new Error ( String ( error ) ) ;
184
184
console . warn ( `Attempt ${ attempt + 1 } failed to list commits:` , lastError . message ) ;
185
-
185
+
186
186
if ( attempt < maxRetries ) {
187
187
// Wait before retry with exponential backoff
188
188
await new Promise ( resolve => setTimeout ( resolve , Math . pow ( 2 , attempt ) * 100 ) ) ;
189
189
continue ;
190
190
}
191
-
191
+
192
192
console . error ( 'All attempts failed to list commits' , lastError ) ;
193
193
return [ ] ;
194
194
}
195
195
}
196
-
196
+
197
197
return [ ] ;
198
198
}
199
199
@@ -211,7 +211,7 @@ export class GitManager {
211
211
const sanitizedDisplayName = sanitizeCommitMessage ( displayName ) ;
212
212
const escapedDisplayName = prepareCommitMessage ( sanitizedDisplayName ) ;
213
213
return this . runCommand (
214
- `git notes --ref=${ ONLOOK_DISPLAY_NAME_NOTE_REF } add -f -m ${ escapedDisplayName } ${ commitOid } ` ,
214
+ `git --no-pager notes --ref=${ ONLOOK_DISPLAY_NAME_NOTE_REF } add -f -m ${ escapedDisplayName } ${ commitOid } ` ,
215
215
) ;
216
216
}
217
217
@@ -221,7 +221,7 @@ export class GitManager {
221
221
async getCommitNote ( commitOid : string ) : Promise < string | null > {
222
222
try {
223
223
const result = await this . runCommand (
224
- `git notes --ref=${ ONLOOK_DISPLAY_NAME_NOTE_REF } show ${ commitOid } ` ,
224
+ `git --no-pager notes --ref=${ ONLOOK_DISPLAY_NAME_NOTE_REF } show ${ commitOid } ` ,
225
225
true ,
226
226
) ;
227
227
if ( result . success && result . output ) {
0 commit comments