CLI to edit a bug description

Timeline

Dan Passaro (dan-passaro) opened

Unless I'm really dense, it seems like there's no way to update a bug description from the CLI. It can be done using git bug termui, but I mostly use git-bug from the CLI.

Here's what I tried:

$ git bug bug title b7bdac4  # just establishing the bug I want to edit is real
Google Drive UI "File name" doesn't update
$ git bug bug edit b7bdac4
2e94c63	open	Edit exercises and exercise parameters   Dan Passaro     
$ git bug bug b7bdac4 edit
2e94c63	open	Edit exercises and exercise parameters   Dan Passaro     
$ git bug bug update b7bdac4
b7bdac4	open	Google Drive UI "File name" doesn't… ◼   Dan Passaro     
$ git bug bug b7bdac4 update
b7bdac4	open	Google Drive UI "File name" doesn't… ◼   Dan Passaro     
$ git bug edit b7bdac4
Error: unknown command "edit" for "git-bug"
Run 'git-bug --help' for usage.
$ git bug update b7bdac4
Error: unknown command "update" for "git-bug"
Run 'git-bug --help' for usage.

Steve Moyer (smoyer64) commented

The bug's "message" is stored as the first comment, so you can list the comments like this:

$ git bug bug comment d76a207
Author: Steve Moyer
Id: dd7766a
Date: Sat Sep 27 10:12:58 2025 -0400

    Include the whole thing, it's meta-data and comments

Author: Steve Moyer
Id: db7d65a
Date: Sat Sep 27 10:17:56 2025 -0400

    This is the first "non-message" comment but the second message in the DAG

and then edit the bug's message (description) using this:

$ git bug bug comment edit dd7766a --message "Include the whole thing, it's meta-data and comments.  It would also be nice syntactic sugar to provide a \"short-cut\" command to change the message"

which results in the bug's message (the first comment) being changed as expected:

$ git bug bug comment d76a207
Author: Steve Moyer
Id: dd7766a
Date: Sat Sep 27 10:12:58 2025 -0400

    Include the whole thing, it's meta-data and comments.  It would also be nice syntactic sugar to provide a "short-cut" command to change the message

Author: Steve Moyer
Id: db7d65a
Date: Sat Sep 27 10:17:56 2025 -0400

    This is the first "non-message" comment but the second message in the DAG

It would be nice to have some syntactic sugar to support this in the CLI. The TermUI accomplishes this as above.

sudoforge commented (edited)

an edit command makes complete sense to me. with the current implementation of the command line, it should be added as a subcommand under the bug entity.