A composable pijul user interface? (brainstorm)

A few things I’ve noted.

Add is obsolete

Needing to pijul add new files is error prone (I for one tend to forget it easily), and not needed often if a good ignore file is in place. record (or whatever its equivalent ends up being named) should offer by default to add any new non-ignored files. To make this acceptable, the dialog when recording the addition of a file needs to offer the following:

  • Add the file
  • Delete the file
  • Add the file to a local ignore list
  • Add the file to the shared ignore list.

With the last two options, the user should be able to edit the ignore pattern before validating.

Push / pull distinction is less important than sync / merge

The distinction between push and pull is not a conceptual distinction, just a change in direction. On the other hand, the distinction between merging two branches (or rather two patchset), and transferring patches between branches needs to be made more overt than it is already. I think the two commands should be:

  • pijul merge [branch] <patchset> offers patches from <patchset> to add to <branch> (presumably defaulting to the current branch)
  • pijul sync <from-repostate> <to-branch> makes the content of <to-branch> (which may be remote) be equal to that of <from-repostate>, presumably requiring an option like --force in case where patches are present in <to-branch> but not in <from-repostate>.

Vocabulary is needed

Pijul needs a good vocabulary to refer to its concepts, a naming scheme and operations on them. Native english-speakers are probably needed here to make the right choices.

  • a patch is […]
  • a patchset is a set of patches. They can be unionned, intersected, filtered by name / tags / author / … and queried for dependencies.
  • a repostate is a set of patches, closed under dependencies. . Their contents can be queried for files: <repostate>/dir/file is the state of that file when the patches in repostate are applied. The difference between two repostates is a patchset. A patchset can be applied to a repostate if all of its dependencies are present there.
  • branches are local labels for repostates; they can be updated and dereferenced. They are referred to by an URI of the form proto://Repo-URL#branch
  • repositories contain several branches. They have an URI.

We may or may not want the notion of remote from git; likewise, we may or may not want a set of draft patches, corresponding to the index in git (i.e., they are given special identifiers preventing them from being referred to in patchsets).

5 Likes