Patch 1998 clean up construction of Darcs.Util.Path.Name

Title clean up construction of Darcs.Util.Path.Name
Superseder Nosy List bf
Related Issues
Status accepted Assigned To

Created on 2020-02-21.18:35:16 by bf, last changed 2020-07-18.13:48:35 by ganesh.

File name Status Uploaded Type Edit Remove
index_-factor-nameof-and-namelength-to-top-level.dpatch bf, 2020-02-21.18:35:15 application/x-darcs-patch
patch-preview.txt bf, 2020-02-21.18:35:15 text/x-darcs-patch
unnamed bf, 2020-02-21.18:35:15 text/plain
See mailing list archives for discussion on individual patches.
msg21868 (view) Author: bf Date: 2020-02-21.18:35:15
The dependencies here are all from patch1997.

7 patches for repository http://darcs.net/screened:

patch 63e2e45030b48bb09e930a73bb87d2c72f89fb81
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Feb 20 21:42:21 CET 2020
  * index: factor nameof and namelength to top level

patch 24188eb914788511b905bf0d2247d42f017640c9
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Feb 20 21:46:48 CET 2020
  * index: refactor second argument of nameof
  It was always called with the dirlength of a state.

patch c4446b814585b63430501391db733cd6ba004a27
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Feb 20 21:54:45 CET 2020
  * index: factor out substateof

patch 59a12dd09d7f7802eb86fe323d0336a7e6891bb2
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Feb 21 10:14:38 CET 2020
  * inline namelength and simplify dirlength calculation

patch 2e2202648cb10bc98579117b85c11920a2405df7
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Feb 21 19:18:04 CET 2020
  * index: fix and extend documentation
  Due to the previous refactors it is now clear that the terminating null byte
  is not included in the iDescriptor, contrary to what I assumed before. I
  have highlighted the places where we treat the root directory specially and
  the conditions that allow the code to work. This is highly unintuitive and,
  as observed previously, violates the invariants of Name, requiring special
  support from Darcs.Util.Path.appendPath.

patch 8e3f0fa9b11560d01426db550053103ea061401f
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Feb 21 19:20:45 CET 2020
  * index: no longer rely on the special behavior of appendPath

patch 93bb14bf86c3ca3c1e745353cf0c53f22a39d68b
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Feb 21 19:20:57 CET 2020
  * clean up construction of Darcs.Util.Path.Name
  We now /always/ check that a Name is valid before constructing one. This is
  possible now since the index no longer builds invalid Names. It also means
  that once an AnchoredPath has been constructed, it cannot be "malicious" as
  checked by isMaliciousPath and the functions in Darcs.UI.CommandsAux that
  build on it and that we used to check paths in patches before applying them.
  Instead, we either call error, if the preconditions are provably fulfilled,
  or else throw a special exception: CorruptIndex when reading the index, and
  CorruptPatch when we read a patch (encapsulated by decodeWhiteName).
msg22172 (view) Author: ganesh Date: 2020-07-18.13:26:17
>  * clean up construction of Darcs.Util.Path.Name

Looks like a nice cleanup, thanks!
Date User Action Args
2020-02-21 18:35:16bfcreate
2020-02-21 18:40:11bfsetstatus: needs-screening -> needs-review
2020-07-18 13:26:17ganeshsetstatus: needs-review -> accepted-pending-tests
messages: + msg22172
2020-07-18 13:48:35ganeshsetstatus: accepted-pending-tests -> accepted