git-mv: succeed even if source is a prefix of destination
[gitweb.git] / builtin-help.c
index fb731cc9345e197e710aea611e9519f1e04e0ab8..6484cb9df2651de7430ee608ef7d14a4d3ac4c99 100644 (file)
@@ -140,7 +140,7 @@ static void list_commands(const char *exec_path, const char *pattern)
                        continue;
 
                entlen = strlen(de->d_name);
-               if (4 < entlen && !strcmp(de->d_name + entlen - 4, ".exe"))
+               if (has_extension(de->d_name, ".exe"))
                        entlen -= 4;
 
                if (longest < entlen)