Commit cca17048 authored by Johannes Schindelin's avatar Johannes Schindelin Committed by Junio C Hamano

git wrapper: Make while loop more reader-friendly

It is not a good practice to prefer performance over readability in
something as performance uncritical as finding the trailing slash
of argv[0].

So avoid head-scratching by making the loop user-readable, and not
Signed-off-by: Johannes Schindelin's avatarJohannes Schindelin <>
Signed-off-by: default avatarJunio C Hamano <>
parent 3827210b
......@@ -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.
while (cmd <= slash && !is_dir_sep(*slash));
while (cmd <= slash && !is_dir_sep(*slash))
if (cmd <= slash) {
*slash++ = 0;
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