# "make test" fails with current HEAD

20 messages from 2005-11-17 to 2005-11-18. Participants: Matthias Urlichs, Johannes Schindelin, A Large Angry SCM, Junio C Hamano, Linus Torvalds, John Benes.
Thread: https://gitlist.dev/t/2568

## Matthias Urlichs, 2005-11-17 15:31

Subject: "make test" fails with current HEAD
Message-ID: <pan.2005.11.17.15.31.56.755022@smurf.noris.de>
URL: https://gitlist.dev/e/pan.2005.11.17.15.31.56.755022%40smurf.noris.de

```
t4103.sh:

fatal: patch with only garbage at line 30
* FAIL 7: check binary diff with replacement.
        git-checkout master
                 git-apply --check --allow-binary-replacement BF.diff

May I suggest to please run "make test" before pushing? Thanks! ;-)

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
She balanced dignity on the tip of her nose.

```

## Johannes Schindelin, 2005-11-17 15:52

Subject: Re: "make test" fails with current HEAD
Message-ID: <Pine.LNX.4.63.0511171652020.17402@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511171652020.17402%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <pan.2005.11.17.15.31.56.755022@smurf.noris.de>

```
Hi,

On Thu, 17 Nov 2005, Matthias Urlichs wrote:

> t4103.sh:
> 
> fatal: patch with only garbage at line 30
> * FAIL 7: check binary diff with replacement.
>         git-checkout master
>                  git-apply --check --allow-binary-replacement BF.diff

Does not fail here.

Did you set your GIT_EXEC_PATH?

Hth,
Dscho

```

## Matthias Urlichs, 2005-11-17 16:03

Subject: Re: "make test" fails with current HEAD
Message-ID: <20051117160318.GE31613@kiste.smurf.noris.de>
URL: https://gitlist.dev/e/20051117160318.GE31613%40kiste.smurf.noris.de
In-Reply-To: <Pine.LNX.4.63.0511171652020.17402@wbgn013.biozentrum.uni-wuerzburg.de>

```
Hi,

Johannes Schindelin:
> Does not fail here.
> 
Does fail here...

> Did you set your GIT_EXEC_PATH?
> 
Yes. :-/

I'll dig.
-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
"Today, the theory of evolution is an accepted fact for everyone but
 a fundamentalist minority, whose objections are based not on reasoning
 but on doctrinaire adherence to religious principles."
           [Dr. James D. Watson, winner of the Nobel prize
            for his co-discovery of the structure of DNA]

```

## A Large Angry SCM, 2005-11-18 03:23

Subject: Re: "make test" fails with current HEAD
Message-ID: <437D4924.50307@gmail.com>
URL: https://gitlist.dev/e/437D4924.50307%40gmail.com
In-Reply-To: <Pine.LNX.4.63.0511171652020.17402@wbgn013.biozentrum.uni-wuerzburg.de>

```
Fails at home (Suse 9.3) but passes a work (Ubuntu Hoary).

*** t4103-apply-binary.sh ***
*   ok 1: stat binary diff -- should not fail.
*   ok 2: stat binary diff (copy) -- should not fail.
*   ok 3: check binary diff -- should fail.
*   ok 4: check binary diff (copy) -- should fail.
*   ok 5: check incomplete binary diff with replacement -- should fail.
*   ok 6: check incomplete binary diff with replacement (copy) -- should 
fail.
* FAIL 7: check binary diff with replacement.
         git-checkout master
                  git-apply --check --allow-binary-replacement BF.diff
* FAIL 8: check binary diff with replacement (copy).
         git-checkout master
                  git-apply --check --allow-binary-replacement CF.diff
*   ok 9: apply binary diff -- should fail.
*   ok 10: apply binary diff -- should fail.
*   ok 11: apply binary diff (copy) -- should fail.
*   ok 12: apply binary diff (copy) -- should fail.
*   ok 13: apply binary diff without replacement -- should fail.
*   ok 14: apply binary diff without replacement (copy) -- should fail.
* FAIL 15: apply binary diff.
         do_reset
                  git-apply --allow-binary-replacement --index BF.diff &&
                  test -z "$(git-diff --name-status binary)"
* FAIL 16: apply binary diff (copy).
         do_reset
                  git-apply --allow-binary-replacement --index CF.diff &&
                  test -z "$(git-diff --name-status binary)"
* failed 4 among 16 test(s)
make[1]: *** [t4103-apply-binary.sh] Error 1


Johannes Schindelin wrote:
> Hi,
> 
> On Thu, 17 Nov 2005, Matthias Urlichs wrote:
> 
>>t4103.sh:
>>
>>fatal: patch with only garbage at line 30
>>* FAIL 7: check binary diff with replacement.
>>        git-checkout master
>>                 git-apply --check --allow-binary-replacement BF.diff
> 
> Does not fail here.
> 
> Did you set your GIT_EXEC_PATH?
> 
> Hth,
> Dscho
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

```

## Johannes Schindelin, 2005-11-18 03:27

Subject: Re: "make test" fails with current HEAD
Message-ID: <Pine.LNX.4.63.0511180425200.6820@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511180425200.6820%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <437D4924.50307@gmail.com>

```
Hi,

On Thu, 17 Nov 2005, A Large Angry SCM wrote:

> Fails at home (Suse 9.3) but passes a work (Ubuntu Hoary).
> 
> *** t4103-apply-binary.sh ***
> *   ok 1: stat binary diff -- should not fail.
> *   ok 2: stat binary diff (copy) -- should not fail.
> *   ok 3: check binary diff -- should fail.
> *   ok 4: check binary diff (copy) -- should fail.
> *   ok 5: check incomplete binary diff with replacement -- should fail.
> *   ok 6: check incomplete binary diff with replacement (copy) -- should fail.
> * FAIL 7: check binary diff with replacement.
>         git-checkout master
>                  git-apply --check --allow-binary-replacement BF.diff

Any chance you investigate this in detail? Like inserting "test_done; 
exit" right before that test, only running t4103-*, and then executing
the command yourself?

Hth,
Dscho

```

## Matthias Urlichs, 2005-11-18 07:21

Subject: Re: "make test" fails with current HEAD
Message-ID: <20051118072115.GJ31613@kiste.smurf.noris.de>
URL: https://gitlist.dev/e/20051118072115.GJ31613%40kiste.smurf.noris.de
In-Reply-To: <Pine.LNX.4.63.0511180425200.6820@wbgn013.biozentrum.uni-wuerzburg.de>

```
Hi,

Johannes Schindelin:
> Any chance you investigate this in detail? Like inserting "test_done; 
> exit" right before that test, only running t4103-*, and then executing
> the command yourself?
> 
Thank you, I know how to debug ;-)

Already in progress.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
A life spent in search of the perfect hash brownie is a life well spent.

```

## Junio C Hamano, 2005-11-18 07:30

Subject: Re: "make test" fails with current HEAD
Message-ID: <7v7jb6o1kl.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v7jb6o1kl.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <pan.2005.11.17.15.31.56.755022@smurf.noris.de>

```
Matthias Urlichs <smurf@smurf.noris.de> writes:

> t4103.sh:
>
> fatal: patch with only garbage at line 30
> * FAIL 7: check binary diff with replacement.
>         git-checkout master
>                  git-apply --check --allow-binary-replacement BF.diff
>
> May I suggest to please run "make test" before pushing? Thanks! ;-)

Well, I do, but the thing is, I do not have an access to your
particular machine ;-).

I *think* this is the same problem as I fixed tonight with help
from LASCM and John Benes, and I'm hoping to push the fix out
before going to bed tonight.  If you are impatient the patch has
already been sent out.

```

## Matthias Urlichs, 2005-11-18 07:51

Subject: Re: "make test" fails with current HEAD
Message-ID: <20051118075117.GK31613@kiste.smurf.noris.de>
URL: https://gitlist.dev/e/20051118075117.GK31613%40kiste.smurf.noris.de
In-Reply-To: <7v7jb6o1kl.fsf@assigned-by-dhcp.cox.net>

```
Hi,

Junio C Hamano:
> > May I suggest to please run "make test" before pushing? Thanks! ;-)
> 
> Well, I do, but the thing is, I do not have an access to your
> particular machine ;-).
> 
*Sigh*.

Sorry about that. It's not you, it's diff 2.8.7 -- which conveniently
omits the word "Binary".

>> Files /dev/null and b/file3 differ

Of course, with LANG=de_DE.UTF-8 the situation is worse ...

>> Dateien /dev/null und b/file3 sind verschieden.

... so git-diff-* might want to set LANG=C.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
They're only trying to make me LOOK paranoid!

```

## Junio C Hamano, 2005-11-18 08:03

Subject: Re: "make test" fails with current HEAD
Message-ID: <7vbr0imlha.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vbr0imlha.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20051118075117.GK31613@kiste.smurf.noris.de>

```
Matthias Urlichs <smurf@smurf.noris.de> writes:

>>> Files /dev/null and b/file3 differ
>
> Of course, with LANG=de_DE.UTF-8 the situation is worse ...

And at this point it becomes more and more tempting to have our
own internal diff generator, without relying on external diff.

A midway compromise solution would be to detect if either file
is binary ourselves and not to call diff but always say "Binary
files difer".

```

## Junio C Hamano, 2005-11-18 08:03

Subject: Re: "make test" fails with current HEAD
Message-ID: <7v8xvmmlgt.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v8xvmmlgt.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20051118075117.GK31613@kiste.smurf.noris.de>

```
Matthias Urlichs <smurf@smurf.noris.de> writes:

>>> Files /dev/null and b/file3 differ
>
> Of course, with LANG=de_DE.UTF-8 the situation is worse ...

And at this point it becomes more and more tempting to have our
own internal diff generator, without relying on external diff.

A midway compromise solution would be to detect if either file
is binary ourselves and not to call diff but always say "Binary
files differ".

```

## Matthias Urlichs, 2005-11-18 08:56

Subject: Re: "make test" fails with current HEAD
Message-ID: <pan.2005.11.18.08.56.22.908009@smurf.noris.de>
URL: https://gitlist.dev/e/pan.2005.11.18.08.56.22.908009%40smurf.noris.de
In-Reply-To: <7vbr0imlha.fsf@assigned-by-dhcp.cox.net>

```
Hi, Junio C Hamano wrote:

> Matthias Urlichs <smurf@smurf.noris.de> writes:
> 
>>>> Files /dev/null and b/file3 differ
>>
>> Of course, with LANG=de_DE.UTF-8 the situation is worse ...
> 
> A midway compromise solution would be to detect if either file
> is binary ourselves and not to call diff but always say "Binary
> files difer".

Actually, there's a better way:

$ diff -u /dev/null /tmp/ra
Binary files /dev/null and /tmp/ra differ
$ echo $?
2

So the trivial fix is to emit our own "Binary files FOO and BAR differ"
line if the exit status is 2.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
If a man will go as far as he can see, he will be able to see farther when
he gets there.

```

## Johannes Schindelin, 2005-11-18 10:35

Subject: Re: "make test" fails with current HEAD
Message-ID: <Pine.LNX.4.63.0511181134080.8037@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511181134080.8037%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <pan.2005.11.18.08.56.22.908009@smurf.noris.de>

```
Hi,

On Fri, 18 Nov 2005, Matthias Urlichs wrote:

> So the trivial fix is to emit our own "Binary files FOO and BAR differ"
> line if the exit status is 2.

>From my diff man page:

-- snip --
DIAGNOSTICS
       An  exit status of 0 means no differences were found, 1 means some 
       differences were found, and 2 means trouble.
-- snap --

The exit value 2 is ambiguous for at least one version of GNU diff.

Hth,
Dscho

```

## Matthias Urlichs, 2005-11-18 10:54

Subject: Re: "make test" fails with current HEAD
Message-ID: <20051118105415.GN31613@kiste.smurf.noris.de>
URL: https://gitlist.dev/e/20051118105415.GN31613%40kiste.smurf.noris.de
In-Reply-To: <Pine.LNX.4.63.0511181134080.8037@wbgn013.biozentrum.uni-wuerzburg.de>

```
Hi,

Johannes Schindelin:
> From my diff man page:
> 
> -- snip --
> DIAGNOSTICS
>        An  exit status of 0 means no differences were found, 1 means some 
>        differences were found, and 2 means trouble.
> -- snap --
> 
> The exit value 2 is ambiguous for at least one version of GNU diff.
> 
AFAIK, We have
0 - no difference
1 - produced a reasonable diff
1 - produced a bad diff because binary stuff starts
    after 4096-or-whatever bytes and diff didn't notice
2 - didn't produce a diff -- binary files differ
2 - something else broke

Right now we simply don't consider the second -2- case, because we just
successfully wrote the two files in question; there's not *that* much
that can fail after that. The second -1- case is sufficiently rare too.

So I still think a "Just write a 'Binary files FOO and BAR differ' line
if the exit status is 2" rule would at least fix the current bug with
diff 2.8.7.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
<Knghtbrd> xtifr - beware of james when he's off his medication  =3D>

```

## Johannes Schindelin, 2005-11-18 11:04

Subject: Re: "make test" fails with current HEAD
Message-ID: <Pine.LNX.4.63.0511181203510.16457@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511181203510.16457%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <20051118105415.GN31613@kiste.smurf.noris.de>

```
Hi,

On Fri, 18 Nov 2005, Matthias Urlichs wrote:

> Johannes Schindelin:
> > From my diff man page:
> > 
> > -- snip --
> > DIAGNOSTICS
> >        An  exit status of 0 means no differences were found, 1 means some 
> >        differences were found, and 2 means trouble.
> > -- snap --
> > 
> > The exit value 2 is ambiguous for at least one version of GNU diff.
> > 
> AFAIK, We have
> 0 - no difference
> 1 - produced a reasonable diff
> 1 - produced a bad diff because binary stuff starts
>     after 4096-or-whatever bytes and diff didn't notice
> 2 - didn't produce a diff -- binary files differ
> 2 - something else broke
> 
> Right now we simply don't consider the second -2- case, because we just
> successfully wrote the two files in question; there's not *that* much
> that can fail after that. The second -1- case is sufficiently rare too.
> 
> So I still think a "Just write a 'Binary files FOO and BAR differ' line
> if the exit status is 2" rule would at least fix the current bug with
> diff 2.8.7.

Dunno. Am I the only one with an odd feeling about that?

Ciao,
Dscho

```

## Matthias Urlichs, 2005-11-18 11:12

Subject: Re: "make test" fails with current HEAD
Message-ID: <20051118111204.GO31613@kiste.smurf.noris.de>
URL: https://gitlist.dev/e/20051118111204.GO31613%40kiste.smurf.noris.de
In-Reply-To: <Pine.LNX.4.63.0511181203510.16457@wbgn013.biozentrum.uni-wuerzburg.de>

```
Hi,

Johannes Schindelin:
> > So I still think a "Just write a 'Binary files FOO and BAR differ' line
> > if the exit status is 2" rule would at least fix the current bug with
> > diff 2.8.7.
> 
> Dunno. Am I the only one with an odd feeling about that?
> 
I don't really like it either, but frankly I'm not going to write a new
(or integrate an existing) diff implementation for 1.0 ... you want to
do it, feel free. ;-)

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
BOFH excuse #217:

The MGs ran out of gas.

```

## Linus Torvalds, 2005-11-18 16:14

Subject: Re: "make test" fails with current HEAD
Message-ID: <Pine.LNX.4.64.0511180812200.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511180812200.13959%40g5.osdl.org
In-Reply-To: <7vbr0imlha.fsf@assigned-by-dhcp.cox.net>

```


On Fri, 18 Nov 2005, Junio C Hamano wrote:
> 
> And at this point it becomes more and more tempting to have our
> own internal diff generator, without relying on external diff.
> 
> A midway compromise solution would be to detect if either file
> is binary ourselves and not to call diff but always say "Binary
> files difer".

Umm.. Why not just say "if the line after the 'diff' line doesn't start 
with '@@ ', then it's a binary diff"?

And not care at _all_ about what it says.

We require unified diffs, and they _always_ start with '@@ ' after the 
header. No need to check anything else.

		Linus

```

## Junio C Hamano, 2005-11-18 17:16

Subject: Re: "make test" fails with current HEAD
Message-ID: <7vwtj5lvvc.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vwtj5lvvc.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.64.0511180812200.13959@g5.osdl.org>

```
Linus Torvalds <torvalds@osdl.org> writes:

> Umm.. Why not just say "if the line after the 'diff' line doesn't start 
> with '@@ ', then it's a binary diff"?

Thanks, that makes sense.

```

## Junio C Hamano, 2005-11-18 19:13

Subject: Re: "make test" fails with current HEAD
Message-ID: <7vveypkbwa.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vveypkbwa.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <7vwtj5lvvc.fsf@assigned-by-dhcp.cox.net>

```
Junio C Hamano <junkio@cox.net> writes:

> Linus Torvalds <torvalds@osdl.org> writes:
>
>> Umm.. Why not just say "if the line after the 'diff' line doesn't start 
>> with '@@ ', then it's a binary diff"?
>
> Thanks, that makes sense.

Maybe not; parse_single_patch would have eaten '@@ -' lines so
in practice that amounts to not checking anything at all.

Which is not a bad idea, though...  That means we would treat
all empty patches as binary diffs, which is certainly simple,
but is it safe enough?

```

## John Benes, 2005-11-18 22:49

Subject: Re: "make test" fails with current HEAD
Message-ID: <437E5A79.9070402@gmail.com>
URL: https://gitlist.dev/e/437E5A79.9070402%40gmail.com
In-Reply-To: <7v7jb6o1kl.fsf@assigned-by-dhcp.cox.net>

```
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Junio C Hamano wrote:
> I *think* this is the same problem as I fixed tonight with help
> from LASCM and John Benes, and I'm hoping to push the fix out
> before going to bed tonight.  If you are impatient the patch has
> already been sent out.

I can verify that "make test" now passes on Cygwin without NO_MMAP
uncommented.
Commit: 2e67a5f449f4026097494569f871d79bf263ab28
Desc: Cygwin *might* be helped with NO_MMAP

- --
John Benes
GPG Fingerprint: D519 25DB BB5C 38FC 9D02  02E7 596D BC50 F880 27FA
"It is not only the living who are killed in war." - Isaac Asimov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBQ35aeWF0oWcU9kCNAQIpgg/9GFi++HvW5J2GYZbcHhAld2cqd6KtgbPN
oUsbPuvGKSM9uP/9pKhOxp+DKJMuFd9mK5FG63jS8i8bthbEzegErLWcfbfM1+Js
0kYIfQEZpJu0+S1uMfsHX1CfS/OtjHebQCD7M9jgMFa1kgJXZl0Zu1rvG5hxTIZV
OwssVwxz9Z2/gWzKFlAwyL4UgI4/mr2f7t43AVSKI0gR0Dry8Ou6B7vjBid9clMd
JNoVHF437FVzAypoSUjmgHJJt+GHYn5noQTOMD0KnokznQckFVxNdALXaoAgkT1Q
adgY+8TObmTbctJ9q2Qi1Z9Y0CAncC0TEGt8D8FBxiH+eJKqEKdmL7JT3ckaQO6S
WZJf/u9SnkUJ089rYbYCvV10hqXz0y5XcGxo8kRKS6XGnY+Ff0hqtxVtHqbog8+y
RtPyeST3vymkPuxx3g/gHrGtXJSZStE2/uNTKyA6IHA9dRUkLn70vHRKZsKKyj/f
n5Ka1CJhIw+DzN4tANsQz9U/Q1olbQIr1khykds5DOhTvdSydSQtT3yOx9Wtt8QZ
OH16pbWSGRNuL/vtwmonnVDsX/JJkUKSn3Z5gwmIvThvrD5TbJjyyYBaYZ9xvtkK
XShm05Xf0yaryVlyUNCjlfNoLhi+gBoTVeaZmx/c1yrDZL6I53g3S79Bktdfd/rE
r0eQqS7GEWc=
=+a+2
-----END PGP SIGNATURE-----

```

## Junio C Hamano, 2005-11-18 23:44

Subject: [PATCH] Do not show .exe in git command list.
Message-ID: <7vacg1frm9.fsf_-_@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vacg1frm9.fsf_-_%40assigned-by-dhcp.cox.net
In-Reply-To: <437E5A79.9070402@gmail.com>

```
Truncate the result from readdir() in the exec-path if they end
with .exe, to make it a bit more readable on Cygwin.

Signed-off-by: Junio C Hamano <junkio@cox.net>

---

 Today I borrowed a Cygwin environment to build things without
 any customization (no config.mak nor make command line
 override), and I have to report that make test passed OK for
 me.

 git.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

applies-to: ff891e258456492507934e82d90fd8aacb124845
f9039f30d56e3815eaab870d8b19c7b94aded8aa
diff --git a/git.c b/git.c
index b9b8c62..bdd3f8d 100644
--- a/git.c
+++ b/git.c
@@ -59,7 +59,8 @@ static void add_cmdname(const char *name
 	if (!ent)
 		oom();
 	ent->len = len;
-	memcpy(ent->name, name, len+1);
+	memcpy(ent->name, name, len);
+	ent->name[len] = 0;
 	cmdname[cmdname_cnt++] = ent;
 }
 
@@ -132,6 +133,8 @@ static void list_commands(const char *ex
 			continue;
 
 		entlen = strlen(de->d_name);
+		if (4 < entlen && !strcmp(de->d_name + entlen - 4, ".exe"))
+			entlen -= 4;
 
 		if (longest < entlen)
 			longest = entlen;
---
0.99.9.GIT

```
