X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git.c;h=a53e24feae183b77986947f9b120a02bc1c18113;hb=960e0eb3eae8d1a5db754ebe44c0ccb414b855ad;hp=940a498962ceb06a1dba85547d61ad62bb81a499;hpb=efe05b019ca19328d27c07ef32b4698a7f36166f;p=git.git diff --git a/git.c b/git.c index 940a49896..a53e24fea 100644 --- a/git.c +++ b/git.c @@ -158,7 +158,7 @@ static int handle_alias(int *argcp, const char ***argv) if (ret >= 0 && WIFEXITED(ret) && WEXITSTATUS(ret) != 127) exit(WEXITSTATUS(ret)); - die("Failed to run '%s' when expanding alias '%s'\n", + die("Failed to run '%s' when expanding alias '%s'", alias_string + 1, alias_command); } count = split_cmdline(alias_string, &new_argv); @@ -428,9 +428,8 @@ int main(int argc, const char **argv) * name, and the dirname as the default exec_path * if we don't have anything better. */ - do - --slash; - while (cmd <= slash && !is_dir_sep(*slash)); + while (cmd <= slash && !is_dir_sep(*slash)) + slash--; if (cmd <= slash) { *slash++ = 0; git_set_argv0_path(cmd);