Add more robust work directory parsing #511
Open
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.
What does this PR do?
This PR removed the requirement for the user to provide the -w and the associated file path when dealing with git submodules. As described in the issue I had created (#501) where git operations were not working correctly even though the
--yadm-data
,--yadm-dir
,--yadm-repo
arguments were being supplied to yadm, I see this as a way in which yadm can take a step towardsStaying out of the way and letting Git do what it’s good at
by relying less on the manual setting of thecore.worktree
git config value and requiring fewer configuration values past the three arguments I mentioned above.What issues does this PR fix or reference?
#501
Previous Behavior
Previously yadm would require the user to supply the
-w <path to workdir>
argument with theyadm init
command when working with submodules, otherwise git commands would not function. This still works with that method of initialization.New Behavior
The new behavior would allow for the user to just initialize the repo through git and not yadm. Either method would work now.
Have tests been written for this change?
No, but I can add them if requested.
Have these commits been signed with GnuPG?
Yes.
Please review yadm's Contributing Guide for best practices.