Skip to content

When should test fixture scripts use the <<- heredoc style? #1423

Closed Answered by Byron
EliahKagan asked this question in Q&A
Discussion options

You must be logged in to vote

This is interesting!

Since I am not really aware of this heredoc format, it's unlikely I would have used it intentionally. Maybe it's part of the Git test-suite where parts have been extracted from initially. Most of the usages are either with git update-index or some sed script that I probably didn't write originally.

Thus, the answer might be in the Git test-suite - maybe the <<- around the sed line has a comment that would reveal if the - was added later and for a specific reason.
I most certainly have no reason for it and recommend removing - where it's not needed.
This might then also be a good commit for the Git mailing list - they are always accepting cleanups and fixes.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Byron
Comment options

@EliahKagan
Comment options

EliahKagan Jun 27, 2024
Collaborator Author

@Byron
Comment options

@EliahKagan
Comment options

EliahKagan Jun 27, 2024
Collaborator Author

@EliahKagan
Comment options

EliahKagan Jun 30, 2024
Collaborator Author

Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants