Skip to content
  • Phillip Wood's avatar
    rebase -m: fix serialization of strategy options · 4960e5c7
    Phillip Wood authored and Junio C Hamano's avatar Junio C Hamano committed
    To store the strategy options rebase prepends " --" to each one and
    writes them to a file. To load them it reads the file and passes the
    contents to split_cmdline(). This roughly mimics the behavior of the
    scripted rebase but has a couple of limitations, (1) options containing
    whitespace are not properly preserved (this is true of the scripted
    rebase as well) and (2) options containing '"' or '\' are incorrectly
    parsed and may cause the parser to return an error.
    
    Fix these limitations by quoting each option when they are stored so
    that they can be parsed correctly. Now that "--preserve-merges" no
    longer exist this change also stops prepending "--" to the options when
    they are stored as that was an artifact of the scripted rebase.
    
    These changes are backwards compatible so the files written by an older
    version of git can still be read. They are also forwards compatible,
    the file can still be parsed by recent versions of git as they treat the
    "--" prefix as ...
    4960e5c7