-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
date: fix interaction of flags, fix issues around --set #6142
base: main
Are you sure you want to change the base?
Conversation
GNU testsuite comparison:
|
"CICD / Build (macos-latest, x86_64-apple-darwin, feat_os_macos)" flaked:
All other failures appear to be known issues, too. |
8ee3b47
to
8439990
Compare
Changes since last push:
|
8439990
to
f71592a
Compare
Changes since last push:
|
f71592a
to
7a60db5
Compare
7a60db5
to
88c69a3
Compare
Changes since last push:
|
GNU testsuite comparison:
|
88c69a3
to
a3c918a
Compare
Changes since last push: Nothing, just a rebase to show that it's still a good idea to do this. |
GNU testsuite comparison:
|
a3c918a
to
0d0847a
Compare
CI failures seem to be only flakes:
Example:
|
0d0847a
to
48ddf40
Compare
Changes since last push:
|
aa5120d
to
5264cb8
Compare
}; | ||
|
||
if let Some(date) = settings.set_to { | ||
// Iterate over all dates - whether it's a single date or a file. | ||
let dates: Box<dyn Iterator<Item = _>> = if let Some(date_string) = &settings.set_to { |
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.
it is starting to be a long function.
maybe split it ?
.replace("%f", "%N"); | ||
println!("{formatted}"); | ||
// Format all the dates | ||
for date in dates { |
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.
like can the content of this loop be in a function ?
vec!["-f", "foo", "-r", "foo"], | ||
// Format with other format | ||
vec!["-I", "-R"], | ||
vec!["-I", "--rfc-3339=date"], |
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.
nice
5264cb8
to
d3be43e
Compare
Changes since last push:
The only CI failure is #6534, as usual. |
GNU testsuite comparison:
|
@BenWiederhake sorry for the latency, it needs a small rebase |
This PR fixes multiple issues around multi-flags:
--reference
argument, but completely ignored it. Yikes!--set
was completely broken. This fixes it largely.-d
,-f
,-r
), formatting options (-I
,-R
,--rfc-3339
), and--set
are often mutually-exclusive, with the exception that input options override themselves (but not each other), and also--set
can be combined with formatting options.Some things are unfixable, in particular the order-sensitive behavior; see #4254#issuecomment-2026446634 and uutils/uutils-args#113