summaryrefslogtreecommitdiff
path: root/Documentation/git-replace.txt
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2014-04-26 22:00:54 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-04-29 12:38:32 -0700
commit3f495f67bc4ec744ac60f6e7bec0924022670998 (patch)
tree68e3ceba28e34aaf183d72f01b5dabf75bd9259c /Documentation/git-replace.txt
parentMerge branch 'db/make-with-curl' (diff)
downloadtgif-3f495f67bc4ec744ac60f6e7bec0924022670998.tar.xz
replace: refactor command-mode determination
The git-replace command has three modes: listing, deleting, and replacing. The first two are selected explicitly. If none is selected, we fallback to listing when there are no arguments, and replacing otherwise. Let's figure out up front which operation we are going to do, before getting into the application logic. That lets us simplify our option checks (e.g., we currently have to check whether a useless "--force" is given both along with an explicit list, as well as with an implicit one). This saves some lines, makes the logic easier to follow, and will facilitate further cleanups. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-replace.txt')
0 files changed, 0 insertions, 0 deletions