From bc09087c482b2d9ef8ec7e1ccd4ecd9e76366f63 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 21 Jan 2024 03:48:06 +0100 Subject: Slight refactor --- src/grab.c | 5 ++--- 1 file 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 -- cgit v1.2.3