Skip to content

Commit a169e0b

Browse files
committed
ENH: add .gitattributes only if was missing
1 parent 802eb58 commit a169e0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/heudiconv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,16 +1708,17 @@ def add_to_datalad(topdir, studydir, msg=None, bids=False):
17081708
shared_access='all')
17091709
# Since .heudiconv could contain sensitive information
17101710
# we place all files under annex and then add
1711-
create_file_if_missing(
1711+
if create_file_if_missing(
17121712
opj(dsh.path, '.gitattributes'),
17131713
"""* annex.largefiles=anything
1714-
""")
1715-
dsh.add('.gitattributes', message="Added gitattributes to place all content under annex")
1714+
"""):
1715+
dsh.add('.gitattributes', message="Added gitattributes to place all content under annex")
17161716
ds.add('.', recursive=True, save=False,
17171717
# not in effect! ?
17181718
#annex_add_opts=['--include-dotfiles']
17191719
)
17201720

1721+
# TODO: filter for only changed files?
17211722
# Provide metadata for sensitive information
17221723
mark_sensitive(ds, 'sourcedata')
17231724
mark_sensitive(ds, '*_scans.tsv') # top level
@@ -1738,7 +1739,6 @@ def add_to_datalad(topdir, studydir, msg=None, bids=False):
17381739
- unlock (thin will be in effect)
17391740
- save/commit (does modechange 120000 => 100644
17401741
1741-
- we should mark dicoms and anatomicals as distribution-restricted
17421742
- could potentially somehow automate that all:
17431743
http://git-annex.branchable.com/tips/automatically_adding_metadata/
17441744
- possibly even make separate sub-datasets for originaldata, derivatives ?

0 commit comments

Comments
 (0)