git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "make test" fails with current HEAD
@ 2005-11-17 15:31 Matthias Urlichs
  2005-11-17 15:52 ` Johannes Schindelin
  2005-11-18  7:30 ` Junio C Hamano
  0 siblings, 2 replies; 20+ messages in thread
From: Matthias Urlichs @ 2005-11-17 15:31 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-17 15:31 "make test" fails with current HEAD Matthias Urlichs
@ 2005-11-17 15:52 ` Johannes Schindelin
  2005-11-17 16:03   ` Matthias Urlichs
  2005-11-18  3:23   ` A Large Angry SCM
  2005-11-18  7:30 ` Junio C Hamano
  1 sibling, 2 replies; 20+ messages in thread
From: Johannes Schindelin @ 2005-11-17 15:52 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: git

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-17 15:52 ` Johannes Schindelin
@ 2005-11-17 16:03   ` Matthias Urlichs
  2005-11-18  3:23   ` A Large Angry SCM
  1 sibling, 0 replies; 20+ messages in thread
From: Matthias Urlichs @ 2005-11-17 16:03 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

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]

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-17 15:52 ` Johannes Schindelin
  2005-11-17 16:03   ` Matthias Urlichs
@ 2005-11-18  3:23   ` A Large Angry SCM
  2005-11-18  3:27     ` Johannes Schindelin
  1 sibling, 1 reply; 20+ messages in thread
From: A Large Angry SCM @ 2005-11-18  3:23 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Matthias Urlichs, git

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
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18  3:23   ` A Large Angry SCM
@ 2005-11-18  3:27     ` Johannes Schindelin
  2005-11-18  7:21       ` Matthias Urlichs
  0 siblings, 1 reply; 20+ messages in thread
From: Johannes Schindelin @ 2005-11-18  3:27 UTC (permalink / raw)
  To: A Large Angry SCM; +Cc: Matthias Urlichs, git

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18  3:27     ` Johannes Schindelin
@ 2005-11-18  7:21       ` Matthias Urlichs
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Urlichs @ 2005-11-18  7:21 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: A Large Angry SCM, git

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-17 15:31 "make test" fails with current HEAD Matthias Urlichs
  2005-11-17 15:52 ` Johannes Schindelin
@ 2005-11-18  7:30 ` Junio C Hamano
  2005-11-18  7:51   ` Matthias Urlichs
  2005-11-18 22:49   ` John Benes
  1 sibling, 2 replies; 20+ messages in thread
From: Junio C Hamano @ 2005-11-18  7:30 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: git

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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18  7:30 ` Junio C Hamano
@ 2005-11-18  7:51   ` Matthias Urlichs
  2005-11-18  8:03     ` Junio C Hamano
  2005-11-18  8:03     ` Junio C Hamano
  2005-11-18 22:49   ` John Benes
  1 sibling, 2 replies; 20+ messages in thread
From: Matthias Urlichs @ 2005-11-18  7:51 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]

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!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18  7:51   ` Matthias Urlichs
@ 2005-11-18  8:03     ` Junio C Hamano
  2005-11-18  8:56       ` Matthias Urlichs
  2005-11-18 16:14       ` Linus Torvalds
  2005-11-18  8:03     ` Junio C Hamano
  1 sibling, 2 replies; 20+ messages in thread
From: Junio C Hamano @ 2005-11-18  8:03 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: git

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".

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18  7:51   ` Matthias Urlichs
  2005-11-18  8:03     ` Junio C Hamano
@ 2005-11-18  8:03     ` Junio C Hamano
  1 sibling, 0 replies; 20+ messages in thread
From: Junio C Hamano @ 2005-11-18  8:03 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: git

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".

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18  8:03     ` Junio C Hamano
@ 2005-11-18  8:56       ` Matthias Urlichs
  2005-11-18 10:35         ` Johannes Schindelin
  2005-11-18 16:14       ` Linus Torvalds
  1 sibling, 1 reply; 20+ messages in thread
From: Matthias Urlichs @ 2005-11-18  8:56 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18  8:56       ` Matthias Urlichs
@ 2005-11-18 10:35         ` Johannes Schindelin
  2005-11-18 10:54           ` Matthias Urlichs
  0 siblings, 1 reply; 20+ messages in thread
From: Johannes Schindelin @ 2005-11-18 10:35 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: git

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18 10:35         ` Johannes Schindelin
@ 2005-11-18 10:54           ` Matthias Urlichs
  2005-11-18 11:04             ` Johannes Schindelin
  0 siblings, 1 reply; 20+ messages in thread
From: Matthias Urlichs @ 2005-11-18 10:54 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]

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>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18 10:54           ` Matthias Urlichs
@ 2005-11-18 11:04             ` Johannes Schindelin
  2005-11-18 11:12               ` Matthias Urlichs
  0 siblings, 1 reply; 20+ messages in thread
From: Johannes Schindelin @ 2005-11-18 11:04 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: git

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18 11:04             ` Johannes Schindelin
@ 2005-11-18 11:12               ` Matthias Urlichs
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Urlichs @ 2005-11-18 11:12 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18  8:03     ` Junio C Hamano
  2005-11-18  8:56       ` Matthias Urlichs
@ 2005-11-18 16:14       ` Linus Torvalds
  2005-11-18 17:16         ` Junio C Hamano
  1 sibling, 1 reply; 20+ messages in thread
From: Linus Torvalds @ 2005-11-18 16:14 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Matthias Urlichs, git



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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18 16:14       ` Linus Torvalds
@ 2005-11-18 17:16         ` Junio C Hamano
  2005-11-18 19:13           ` Junio C Hamano
  0 siblings, 1 reply; 20+ messages in thread
From: Junio C Hamano @ 2005-11-18 17:16 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Matthias Urlichs, git

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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18 17:16         ` Junio C Hamano
@ 2005-11-18 19:13           ` Junio C Hamano
  0 siblings, 0 replies; 20+ messages in thread
From: Junio C Hamano @ 2005-11-18 19:13 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git

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?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: "make test" fails with current HEAD
  2005-11-18  7:30 ` Junio C Hamano
  2005-11-18  7:51   ` Matthias Urlichs
@ 2005-11-18 22:49   ` John Benes
  2005-11-18 23:44     ` [PATCH] Do not show .exe in git command list Junio C Hamano
  1 sibling, 1 reply; 20+ messages in thread
From: John Benes @ 2005-11-18 22:49 UTC (permalink / raw)
  To: Junio C Hamano, git

-----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-----

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] Do not show .exe in git command list.
  2005-11-18 22:49   ` John Benes
@ 2005-11-18 23:44     ` Junio C Hamano
  0 siblings, 0 replies; 20+ messages in thread
From: Junio C Hamano @ 2005-11-18 23:44 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2005-11-18 23:44 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-17 15:31 "make test" fails with current HEAD Matthias Urlichs
2005-11-17 15:52 ` Johannes Schindelin
2005-11-17 16:03   ` Matthias Urlichs
2005-11-18  3:23   ` A Large Angry SCM
2005-11-18  3:27     ` Johannes Schindelin
2005-11-18  7:21       ` Matthias Urlichs
2005-11-18  7:30 ` Junio C Hamano
2005-11-18  7:51   ` Matthias Urlichs
2005-11-18  8:03     ` Junio C Hamano
2005-11-18  8:56       ` Matthias Urlichs
2005-11-18 10:35         ` Johannes Schindelin
2005-11-18 10:54           ` Matthias Urlichs
2005-11-18 11:04             ` Johannes Schindelin
2005-11-18 11:12               ` Matthias Urlichs
2005-11-18 16:14       ` Linus Torvalds
2005-11-18 17:16         ` Junio C Hamano
2005-11-18 19:13           ` Junio C Hamano
2005-11-18  8:03     ` Junio C Hamano
2005-11-18 22:49   ` John Benes
2005-11-18 23:44     ` [PATCH] Do not show .exe in git command list Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).