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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for Submodule Versioning #23
Add Support for Submodule Versioning #23
Changes from 17 commits
c7197c1
761a583
e7247ec
b1d0520
f7ad9e4
ea2884f
da3a7b4
043f387
7f9d730
0d4e1ef
4fdaa93
30d74d2
fd0925d
0dd1bb5
111b54e
f5ba079
0e92ea6
dc059b8
b79c25b
c6f8ba9
386a08e
59f6c35
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this makes sense here. For
git_version!()
, the fallback means: if "git describe fails, give this as version instead".I think the fallback should have the same meaning for submodules: each submodule entry should apply the fallback independently if
git describe
fails.At the very least, it will mean that the submodule paths are always real paths. With the current interpretation of the fallback argument, you can't distinguish between the fallback being used or a submodule at path "fallback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it felt clunky. I will implement this tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@de-vri-es Fixed up to work as you described. Will conditionally add a fallback on a per-submodule basis if a fallback is provided, and throw a compiler error otherwise, just like
git_version!()
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does
echo $displaypath
work on windows though? Maybe we should parse the.gitmodules
file instead relying ongit submodule foreach
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lemme check real quick.
Edit: Yep! It works. The shell that executes the command must be implemented by git. Tested on Powershell and Command Prompt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok :)