LibraryOfCongress / bagit-spec

8 stars 7 forks source link

RECOMMENDED that last line in tag files ends with linefeed #22

Closed stain closed 6 years ago

stain commented 6 years ago

.. as pointed out in the ABNF patch, even the second line in bagit.txt must end with linefeed.

justinlittman commented 6 years ago

I'd recommend against this change, as I don't see what requiring the additional LF accomplishes. The risk is that it reduces interoperability by making it easier to create invalid bags.

stain commented 6 years ago

It is not to specify an extra newline - but that there is a newline at the last line. (that is the last character of a file is CR or LF). Or to say it differently - the last line is not special, its newline is not removed.

OK, I agree on the interoperability challenge as it is not important if it is missing. But it would be good if producers are consistent.

Currently the spec is written so that the trailing line-feed is implied, (except for that ABNF for bagit.txt), as it says all tag files are line-oriented and terminated (not separated) with linefeeds.

So perhaps just "it is RECOMMENDED that the last line in a tag file also ends with CR/LF/CRLF" ? Then it is more clearly about producing than parsing.

johnscancella commented 6 years ago

@justinlittman thoughts on the new phrasing?

johnscancella commented 6 years ago

@stain Once the conflicts are resolved I will merge this. Thanks

justinlittman commented 6 years ago

OK with new wording.

johnscancella commented 6 years ago

fixed merge conflict and merged manually