The first patch is an incompatible change in behavior which is why I am not
screening it yet. If you think it is not worth breaking compatibility, I can
rebase the second patch and send it separately.
2 patches for repository http://darcs.net/screened:
patch 6bb33dd39be6659341f75cd00d9e71f606318ed4
Author: Ben Franksen <ben.franksen@online.de>
Date: Thu Jul 6 09:34:39 CEST 2023
* make --boring mutually exclusive with --look-for-adds if both are supported
This means that --boring now implies --look-for-adds i.e. you no longer have
to list both options for --boring to have any effect. This better mirrors
how these options are treated internally and IMO removes a wart in the UI.
Note that the add command is not affected by this.
patch 81bd303661a17b0dda461a5249b8109170ddcc02
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Jul 7 09:03:57 CEST 2023
* distinguish between option errors and warnings
The goal here is to strike a balance between being too restrictive (which
impairs forward compatibility) and too lax (causing ambiguous behavior). For
instance, an unrecognized option or an extra argument where none is expected
can be safely ignored in default files, which is good in case we decide to
add the option or argument later. OTOH, if we allow conflicting options we
have to make an arbitrary choice which one wins, so we want to be more
strict here; neither do we want want to allow an option that is missing a
required argument.
I think it's a reasonable change. I might tweak the help strings a bit:
>+ "look for (non-boring) files that could be added"
I wouldn't mention non-boring here, I think it's implicit in the concept
of an ignore/boring file that it will be respected.
> + "look (even) for boring files"
I think this should mention "could be added", e.g.
"look for any file that could be added, even boring files"
1 patch for repository http://darcs.net/screened:
patch 315083104ebb40606322f6642e237186f81759c5
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Jul 30 16:47:06 CEST 2023
* improve help for --look-for-adds/--boring
Might as well add one more closely related patch here.
1 patch for repository http://darcs.net/screened:
patch be0274acd1fbb4f604d4645bd4d9370afe324d04
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Jul 7 09:10:02 CEST 2023
* support short options in defaults files
So you can say e.g. 'whatsnew -l' in a defaults file. This makes it more or
less necessary to display options in error and warning messages in full i.e.
with leading dashes, so we make this change, too. Note that leaving out the
two dashes for a long option remains allowed in a defaults file, but for
short options the leading dash is mandatory.