• Mike Frysinger's avatar
    git-cl: simplify squash commandline parsing · a989d559
    Mike Frysinger authored
    We can have --no-squash update the --squash state directly so we don't
    have to constantly check two different knobs.  This means opts.squash
    is now a tristate: None means load config settings while True/False
    means the user has specified a command line option.  This also means
    we don't have to detect multiple --squash/--no-squash flags as the
    argparse module will take care of coalescing.
    
    Bug: 993518
    Test: `git cl upload` uses my ~/.gitconfig
    Test: `git cl upload --squash` squashes
    Test: `git cl upload --no-squash` doesn't squash
    Change-Id: Ib2577db11d3af03c93cb47d8b78b341213720a92
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1754234Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
    Commit-Queue: Mike Frysinger <vapier@chromium.org>
    a989d559
git_cl.py 215 KB