Commit 8fa7975b authored by 0xAX's avatar 0xAX 💻 Committed by Junio C Hamano

git: make was_alias and done_help non-static

'was_alias' variable does not need to store it's value on each
iteration in the loop; this variable gets assigned the result
of run_argv() every time in the loop before being used.

'done_help' variable does not need to be static variable too if
we move it out the loop.
Signed-off-by: 0xAX's avatarAlexander Kuleshov <>
Helped-by: Eric Sunshine's avatarEric Sunshine <>
Helped-by: default avatarJeff King <>
Signed-off-by: default avatarJunio C Hamano <>
parent 9874fca7
......@@ -618,6 +618,7 @@ int main(int argc, char **av)
const char **argv = (const char **) av;
const char *cmd;
int done_help = 0;
startup_info = &git_startup_info;
......@@ -680,9 +681,7 @@ int main(int argc, char **av)
while (1) {
static int done_help = 0;
static int was_alias = 0;
was_alias = run_argv(&argc, &argv);
int was_alias = run_argv(&argc, &argv);
if (errno != ENOENT)
if (was_alias) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment