Closed c6c7 closed 3 years ago
Used let*
to remove the nested let
expressions. This seems more reasonable to me in terms of style.
Yes. And also you don't actually need to use two different variable names.
Additionally my fixup commit anchors the regexp, removes superfluous backslashes, and switches to and
to push a hypothetically possible future error into version<
(which I assume would be easier to understand than something about match-string
).
Thank you for the edits! I went ahead and squashed your change into mine. Please let me know if I should have done something different. I'm not familiar with PR etiquette in this repository.
Thanks!
The Git version installed on a workstation I use Emacs on is of the form "2.32.0.272.[commit-hash]-[branch-name]" and causes
borg--maybe-absorb-gitdir
to report the error "Invalid version syntax: ‘2.32.0.272.[commit-hash]-[branch-name]’".I noticed the change borg--maybe-absorb-gitdir: Support version suffix on Windows whitelisted a similar suffix and figured I might instead keep as much from the beginning of the version as possible instead.
Apologies for the
string-match
cruft in this change. It feels like there should be a cleaner way to accomplish what I'm going for, but I'm not aware of it at the moment.