BF: read RIA config from stdin instead of temporary file#7147
Merged
Conversation
as outlined in a comment by @bpoldrack in the code, git config -f - can read from stdin. This is supported by git as its a unix convention. Trial and error confirms that this also runs successfully in a Windows CMD. By switching to a git config call with stdin as the input file, we spare the need to write a temporary config file. This fix could thus fix datalad#6514, where a user error lead to a non-existent TMP path and a subsequent failure to create the temporary config file.
Member
|
Note to myself: This will need some rectification in |
Codecov ReportBase: 88.38% // Head: 88.53% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## maint #7147 +/- ##
==========================================
+ Coverage 88.38% 88.53% +0.15%
==========================================
Files 355 355
Lines 46517 49307 +2790
Branches 0 6232 +6232
==========================================
+ Hits 41112 43655 +2543
- Misses 5405 5620 +215
- Partials 0 32 +32
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Member
|
note: benchmarks error are likely unrelated -- filed #7149 |
Collaborator
|
PR released in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A RIA postclone config hook tried to read a special remote UUID from a stores config file by writing the config files contents to a temporary config file, and subsequently running
git config -f <thatfile>. As outlined in a comment by @bpoldrack in the code,git config -f -can read from stdin:A quick chat in the Git IRC channel hinted that this is supported by git as its a unix convention. Trial and error confirms that this patch also runs successfully in a Windows CMD. I'll rely on the tests on MacOS to check if it runs there successfully, too. By switching to a git config call with stdin as the input file, we spare the need to write a temporary RIA config file. This fix could thus fix #6514, where a user error lead to a non-existent TMP path and a subsequent failure to create the temporary config file.