Skip to content
  • Duy Nguyen's avatar
    config: add --move-to[-regexp] · 790bacd8
    Duy Nguyen authored
    This option can be used to move one or multiple variables from one
    place to another, e.g. to move some aliases from repo config to user
    config, or from repo config to per-worktree config.
    
    This will be useful for moving config variables around, especially when
    enabling or disabling extensions.worktreeConfig (see the update in
    git-worktree.txt for a real example).
    
    The implementation is definitely not the best. We could lock both
    source and destination before the move, and perhaps edit these files
    just once instead of once per key. But it adds a lot more complication
    to config write code. Let's stay with something simple. We can
    optimize it later.
    790bacd8