diff options
author | Jeff King <peff@peff.net> | 2014-04-26 22:00:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-29 12:38:32 -0700 |
commit | 3f495f67bc4ec744ac60f6e7bec0924022670998 (patch) | |
tree | 68e3ceba28e34aaf183d72f01b5dabf75bd9259c /line-log.h | |
parent | Merge branch 'db/make-with-curl' (diff) | |
download | tgif-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 'line-log.h')
0 files changed, 0 insertions, 0 deletions