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
RF: push since=''
-> push --since='^'
#4617
Conversation
Implements the decision made in dataladgh-4582 to use this character as a more intuitive alternative than an empty string. Fixes dataladgh-4582
I can replicate that locally. Real bug, stupid, and should be fixed now. |
Otherwise we would require managed branches on either end.
Codecov Report
@@ Coverage Diff @@
## master #4617 +/- ##
==========================================
+ Coverage 89.53% 89.55% +0.01%
==========================================
Files 286 286
Lines 38822 38822
==========================================
+ Hits 34760 34767 +7
+ Misses 4062 4055 -7
Continue to review full report at Codecov.
|
@@ -114,8 +114,8 @@ class Push(Interface): | |||
constraints=EnsureStr() | EnsureNone(), | |||
doc="""specifies commit-ish (tag, shasum, etc.) from which to look for | |||
changes to decide whether pushing is necessary. |
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.
"whether"! I feel you now!
If an empty string is given, the last state of the current branch | ||
at the sibling is taken as a starting point."""), | ||
If '^' is given, the last state of the current branch at the sibling | ||
is taken as a starting point."""), |
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.
starting point for what? Unrelated to the intent of this PR, so I will just approve as is, but this option might need further explanation of "its purpose in life" - that unlike git " Using this option allows to avoid considering subdatasets where no changes were made since the that starting point" or alike
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.
# figure out state of remote branch and set `since` | ||
since = _get_corresponding_remote_state(ds_repo, to) | ||
if not since: | ||
lgr.info( | ||
"No tracked remote for active branch, " | ||
"detection of last pushed state not in effect.") | ||
elif since: | ||
# will blow with ValueError if unusable | ||
ds_repo.get_hexsha(since) |
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.
Thanks to the comment this suggestion
ds_repo.get_hexsha(since) | |
since = ds_repo.get_hexsha(since) |
is probably (who knows what helper functions do/report) is necessary. Just a note to myself then
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.
This would turn a potentially symbolic ref into a hexsha and make subsequent log messages harder to decode. I'd rather not do that.
Implements the decision made in gh-4582 to use this character as a more
intuitive alternative than an empty string.
Fixes gh-4582