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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got backout/cherrypick auto commit
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Thu, 19 Jan 2023 12:39:02 +0100

Download raw body.

Thread
  • Stefan Sperling:

    got backout/cherrypick auto commit

  • On Thu, Jan 19, 2023 at 07:05:44PM +1100, Mark Jamsek wrote:
    > As per the subject and todo item, the below diff introduces the -a flag
    > to both the backout and cherrypick commands.
    > 
    > I was glad to see this on the todo list because I'll use 'got cy -a'
    > a lot! I often run log or tog to copypasta the log message before
    > running `got cy branch && got ci -m msg` so I was keen to see this
    > implemented.
    > 
    > I'm really looking for feedback though as I'm not sure if the annotated
    > log message and base-commit bump stsp mentioned is adequate. Thanks!
    
    An alternative way to solve the log message copy-pasta problem
    could be to let cherrypick/backout leave trails of meta-data
    behind somewhere (e.g. in the .got/ directory, or in the
    repository in form of references in refs/got/ pointing at
    blobs), which 'got commit' would then look for and use if
    present to pre-populate the log message buffer with lines
    from one or more commits that were merged/backed out.
    
    This would need some careful consideration, since there is an
    inherent risk of the work tree state and meta-data getting
    out of sync, which might be difficult to detect (e.g. the user
    could be editing files such that some or all changes disappear,
    or run got add/delete/revert/cherrypick/backout, and so on).
    But in the worst case the user gets a useless log message
    template and just deletes the undesirable content.
    
    This solution might be simpler in terms of UI though because
    the problem of pre-populating the log message with useful
    content would be solved automatically, without the user having
    to ask for it.
    
    
  • Stefan Sperling:

    got backout/cherrypick auto commit