File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -355,23 +355,17 @@ pub fn get_diff(
355
355
) ,
356
356
) ;
357
357
358
- let old_revspec = if stage {
359
- format ! ( "HEAD:{p}" )
360
- } else {
361
- format ! ( ":{p}" )
362
- } ;
363
- let ( old_blob_id, old_root) =
364
- resolve_revspec ( & gix_repo, & old_revspec) ;
365
-
366
358
// TODO:
367
359
// Make sure that the revspec logic is correct, i. e. uses the correct syntax for all the
368
360
// relevant cases.
369
- let new_revspec = if stage {
370
- format ! ( ":{p}" )
361
+ let ( old_revspec , new_revspec) = if stage {
362
+ ( format ! ( "HEAD :{p}" ) , format ! ( ":{p}" ) )
371
363
} else {
372
- p . to_string ( )
364
+ ( format ! ( ":{p}" ) , p . to_string ( ) )
373
365
} ;
374
366
367
+ let ( old_blob_id, old_root) =
368
+ resolve_revspec ( & gix_repo, & old_revspec) ;
375
369
let ( new_blob_id, new_root) =
376
370
resolve_revspec ( & gix_repo, & new_revspec) ;
377
371
You can’t perform that action at this time.
0 commit comments