The sound distributed version control system

#653 First `pijul record` is actually the second change (empty initial superfluous "commit")

Opened by coconut on February 28, 2022
coconut on February 28, 2022

Hello.

Apparently the first pijul record that I ran is the second, and the first one has an empty body. According to pijul --version, I am using version 1.0.0-beta.

To reproduce:

$ pijul init foobar
$ cd foobar
$ echo > test
$ pijul record test

Now, it will open up your $EDITOR (I think it defaults to nano) where you can edit message on the top of the file, but it already shows you that there are two dependencies (this being the 2nd). OK, let us assume that we gave it a message, saved and quit our editor.

Now type:

$ pijul log
Change T4E3GFIEGW7NIRFHMMVGED2NPEX7CFLOMTW45LNT5P5DJKO3P3RQC
Author: coconut
Date: 2022-02-28 06:13:10.986879472 UTC

    xxxx

Change CCRFO6XD2Z66YGVBG5HXW7PIUHDMOCIPICQPS62LA5ZFFF5EO4RQC
Author: 
Date: 2022-02-28 06:13:14.831142330 UTC

First off, why is the first one without an author? It should be me! I ran the pijul init! (I use a key and it asked for my password when I recorded the first file, but perhaps it should ask at pijul init as well if that is what it takes to be its author, along with opening up my editor to give it a message.)

Second, how come there is a first change at all which is not shown before the first pijul record? It seems like the only difference is 2-4 seconds between the two, so it probably has to do with the first pijul record after all, but this is quite confusing and annoying to say the least.

Is it going to get fixed, please? I expect the first pijul record to be the first change, or if pijul init is the first, then make it so (ask for password if necessary) and allow me to give it a message (and become the author!). If it becomes the first because of the first pijul record, then is there a way to change its message of this superfluous change, and make myself the author?

I actually do not understand the need for there to be a “change” without me as the author (who ran pijul init and the first pijul record to begin with) and without a message.

Is there a good reason for this, or is this going to get fixed? If it is a bug or not intended, I may fix it myself, honestly, because it really is annoying. I am not familiar with pijul yet though so contributions would have to be done through patches (diff files) via e-mail.

Thank you for your help and reply in advance!

wkordalski on February 28, 2022
coconut on February 28, 2022

Indeed.

message = ''
timestamp = '2022-02-28T06:09:39.220984105Z'
authors = []

# Hunks

1. Root add
  up 1.0, new 0:0

Why is this needed? Why cannot we associate the root record to an author when doing pijul init at the very least? It is counter-intuitive and unnecessary. There must be a way against this. As @tankf33der has said, it serves an internal special purpose. I believe this should be fixed.

AfoHT on March 1, 2022

Hi!

It is not superfluous as discussed here: Modular monorepos

But I agree that the current not-ideal surprise factor of this root change, the inability to edit the message and no author being set are usability issues that needs improvements.

coconut on March 1, 2022

I suppose if you cannot give it an author at pijul init, along with a message, then we could hide it from the history, but I am not sure either way. :(