"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Ted Bullock <tbullock@comlore.com>
Subject:
got histedit tribulations
To:
gameoftrees@openbsd.org
Date:
Sun, 26 Feb 2023 18:13:36 -0700

Download raw body.

Thread
Hiya folks,

So I attempted to use got histedit this evening to change a significant
typo in a commit message. So far, I've read through the manual on this
and I'm left barely ahead but definitely without an edited commit message.

What I've gleaned is this:

Step 1.
Backup my tree using
$ got update -c <some prior commit ID before the oopsy>

Step 2.
Run got histedit
$ got histedit

This then opens the editor and asks me to write a program telling it to
somehow change the message. So I did this.

$ got histedit
614
a
pick da5cb32e60a7
mesg
.
w
637
q


I left it blank because it indicated that I would be given an
opportunity to craft a longer response than a one liner by opening the
editor again. See I even used `ed` a little and everything!
but I got this in response.

got: histedit syntax error on line 12

Ok, I guess I didn't print the rest of the file so maybe my second line
there is line 12? I dunno. I gave up here and started mashing my face
into this email message. Please send help.

This is SUPER SUPER SUPER opaque. I have some question about the design
process that led to this mechanic.

To make this feedback more useful:

1. Why is it necessary to backup to an arbitrary point in the tree to
run this? From a user perspective this is weird for me, like if you want
me to write a program to edit the history, let me specify that in the
program.
2. Why is the default behavior to write a program anyway? The vast
majority of edits are going to be small one-liners that surely could
just be managed with a simple command like a hypothetical
$ got histedit -b <branch> -c <commit> -e <instruction> -m <summary>
where e is the edit instruction and m describes the edit

I'm aware I overloaded your options in that example, it's just a
hypothetical.

Thanks guys, great work so far!

-- 
Ted Bullock <tbullock@comlore.com>