Some very old (almost 6-year old) patches that I've just rebased against
screened. Should look at my todo list more often.
Not sure if the help text makes sense in English, looking for your judgement.
The rationale for 9b86a4f2b022bf1387d4d2d5c6c1a54abf7aa536 is that currently:
$ darcs log -h 5d6 --count
1
$ darcs log --matches 'hash 5d6' --count
5
While I don't really expect anyone to select a bunch of patches based on a
common hash prefix, this is for coherence and for honoring the contract with
the user.
3 patches for repository http://darcs.net/screened:
patch d682cdb483060d25b6921c75360c53cefe52c6eb
Author: Gian Piero Carrubba <gpiero@rm-rf.it>
Date: Fri Dec 16 18:47:02 CET 2022
* clarify help for --hash, --from-hash and --to-hash options
patch edabbbd32a9cd4091e4dff2f4f909f15c1446d52
Author: Gian Piero Carrubba <gpiero@rm-rf.it>
Date: Fri Dec 16 18:59:36 CET 2022
* mention --from-hash and --to-hash in the output of `darcs help patterns`
patch 9b86a4f2b022bf1387d4d2d5c6c1a54abf7aa536
Author: Gian Piero Carrubba <gpiero@rm-rf.it>
Date: Fri Dec 16 19:07:43 CET 2022
* add --hashes option and use it instead of --hash where appropriate
This way, -h/--hash/--hashes really become aliases for
--match/--matches 'hash ...', as suggested by `darcs help patterns`.
The changes make sense to me.
On the English, when you say "a patch whose hash prefix matches HASH" I
guess this is meant to be parsed as "a patch whose hash (prefix matches)
HASH"?
The tricky bit is that it probably more naturally parses as "a patch
whose (hash prefix) matches HASH" which sort of implies the existence of
a unique hash prefix.
I wonder if renaming the meta-variable and going for something like "a
patch whose hash starts with HASHPREFIX" would work better?
I agree that the last wording proposed by Ganesh is the best option
here.
Apart from that I am fine with the 3 patches. The code changes look
reasonable to me. I would feel safer with a test or two, and would
like to encourage you to add one, but this is not a requirement.
(That would be hypocritical, given that we don't have any systematic
tests for matching options yet.)