aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-01-21 03:48:06 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-01-21 03:49:32 +0100
commitbc09087c482b2d9ef8ec7e1ccd4ecd9e76366f63 (patch)
tree4d74d60a5302ba10e16dc2deb866d2794bf7b3df /src
parentb14a5c76f05df27baa54de63885a498e6bba99e1 (diff)
Slight refactor
Diffstat (limited to 'src')
-rw-r--r--src/grab.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/grab.c b/src/grab.c
index 4cb5a1a..d1569f3 100644
--- a/src/grab.c
+++ b/src/grab.c
@@ -86,7 +86,7 @@ static char *xstrchrnul(const char *, char);
static int filecnt, rv;
static bool bflag, cflag, nflag, sflag, Uflag, zflag;
static bool fflag = GIT_GRAB;
-static put_func putf = putm;
+static put_func putf;
static const cmd_func op_table[UCHAR_MAX] = {
['g'] = cmdg,
@@ -193,9 +193,8 @@ main(int argc, char **argv)
{
cflag = !streq(env_or_default("TERM", ""), "dumb");
}
- if (!cflag)
- putf = putm_nc;
+ putf = cflag ? putm : putm_nc;
ops = comppat(argv[0]);
#if GIT_GRAB