@@ -307,12 +307,19 @@ def move_tag_stamp(repo, format, version):
307
307
308
308
309
309
def disable_pristine_tar (options , reason ):
310
- """Disable pristine tar if enabled"""
310
+ """Disable pristine- tar if enabled"""
311
311
if options .pristine_tar :
312
312
gbp .log .info ("%s: setting '--no-pristine-tar' option" % reason )
313
313
options .pristine_tar = False
314
314
315
315
316
+ def disable_pristine_lfs (options , reason ):
317
+ """Disable pristine-lfs if enabled"""
318
+ if options .pristine_lfs :
319
+ gbp .log .info ("%s: setting '--no-pristine-lfs' option" % reason )
320
+ options .pristine_lfs = False
321
+
322
+
316
323
def build_parser (name ):
317
324
try :
318
325
parser = GbpOptionParserDebian (command = os .path .basename (name ), prefix = '' ,
@@ -359,6 +366,8 @@ def build_parser(name):
359
366
dest = "filters" , action = "append" )
360
367
import_group .add_boolean_config_file_option (option_name = "pristine-tar" ,
361
368
dest = "pristine_tar" )
369
+ import_group .add_boolean_config_file_option (option_name = "pristine-lfs" ,
370
+ dest = "pristine_lfs" )
362
371
import_group .add_option ("--allow-same-version" , action = "store_true" ,
363
372
dest = "allow_same_version" , default = False ,
364
373
help = "allow import of already imported version" )
@@ -487,6 +496,7 @@ def main(argv):
487
496
488
497
if repo .bare :
489
498
disable_pristine_tar (options , "Bare repository" )
499
+ disable_pristine_lfs (options , "Bare repository" )
490
500
491
501
# unpack
492
502
dirs ['tmp' ] = os .path .abspath (tempfile .mkdtemp (dir = '..' ))
@@ -532,8 +542,11 @@ def main(argv):
532
542
else :
533
543
gbp .log .warn ("Didn't find a diff to apply." )
534
544
535
- if imported and options .pristine_tar :
536
- repo .create_pristine_tar_commits (commit , sources )
545
+ if imported :
546
+ if options .pristine_lfs :
547
+ repo .create_pristine_lfs_commits (sources )
548
+ if options .pristine_tar :
549
+ repo .create_pristine_tar_commits (commit , sources )
537
550
if repo .get_branch () == options .debian_branch or repo .empty :
538
551
# Update HEAD if we modified the checked out branch
539
552
repo .force_head (options .debian_branch , hard = True )
0 commit comments