* [PATCH 0/5] fix up 'jk/pack-bitmap' branch
@ 2013-11-07 21:58 Ramsay Jones
2013-11-07 22:19 ` Jeff King
0 siblings, 1 reply; 10+ messages in thread
From: Ramsay Jones @ 2013-11-07 21:58 UTC (permalink / raw)
To: Jeff King
Cc: Vicent Marti, Junio C Hamano, Torsten Bögershausen,
GIT Mailing-list
Hi Jeff,
These patches fix various errors/warnings on the cygwin, MinGW and
msvc builds, provoked by the jk/pack-bitmap branch.
Note that this does not fix all problems on the msvc build; I have
a solution, but I don't like it. :-D So, I'm going to try a different
fix. I had hoped to have done this by now, but ... (hopefully, sometime
this weekend).
Note that I have only tested the cygwin and MinGW builds by running
the t5310-pack-bitmaps.sh test, and only on a little-endian machine.
(Torsten has tested the first patch on a big-endian)
Note also, that these patches are build on top of the 'pu' branch
as of yesterday (pu @ 2b65d9ebc).
So, could you please squash these patches into the relevant commits
on your branch.
Thanks!
ATB,
Ramsay Jones
Ramsay Jones (5):
compat/bswap.h: Fix build on cygwin, MinGW and msvc
Makefile: Add object files in ewah/ to clean target
khash.h: Spell the null pointer as NULL
pack-objects: Limit visibility of 'indexed_commits' symbols
ewah_bitmap.c: Fix printf format warnings on MinGW
Makefile | 5 +--
builtin/pack-objects.c | 6 ++--
compat/bswap.h | 97 +++++++++++++++++++++++++++++++++++---------------
ewah/ewah_bitmap.c | 6 ++--
khash.h | 2 +-
5 files changed, 79 insertions(+), 37 deletions(-)
--
1.8.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] fix up 'jk/pack-bitmap' branch
2013-11-07 21:58 [PATCH 0/5] fix up 'jk/pack-bitmap' branch Ramsay Jones
@ 2013-11-07 22:19 ` Jeff King
2013-11-08 1:39 ` Vicent Martí
2013-11-08 17:10 ` Torsten Bögershausen
0 siblings, 2 replies; 10+ messages in thread
From: Jeff King @ 2013-11-07 22:19 UTC (permalink / raw)
To: Ramsay Jones
Cc: Vicent Marti, Junio C Hamano, Torsten Bögershausen,
GIT Mailing-list
On Thu, Nov 07, 2013 at 09:58:02PM +0000, Ramsay Jones wrote:
> These patches fix various errors/warnings on the cygwin, MinGW and
> msvc builds, provoked by the jk/pack-bitmap branch.
Thanks. Your timing is impeccable, as I was just sitting down to
finalize the next re-roll. I'll add these in.
-Peff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] fix up 'jk/pack-bitmap' branch
2013-11-07 22:19 ` Jeff King
@ 2013-11-08 1:39 ` Vicent Martí
2013-11-08 17:10 ` Torsten Bögershausen
1 sibling, 0 replies; 10+ messages in thread
From: Vicent Martí @ 2013-11-08 1:39 UTC (permalink / raw)
To: Jeff King
Cc: Ramsay Jones, Junio C Hamano, Torsten Bögershausen,
GIT Mailing-list
Thank you Ramsay, all the patches look OK to me.
On Thu, Nov 7, 2013 at 11:19 PM, Jeff King <peff@peff.net> wrote:
> On Thu, Nov 07, 2013 at 09:58:02PM +0000, Ramsay Jones wrote:
>
>> These patches fix various errors/warnings on the cygwin, MinGW and
>> msvc builds, provoked by the jk/pack-bitmap branch.
>
> Thanks. Your timing is impeccable, as I was just sitting down to
> finalize the next re-roll. I'll add these in.
>
> -Peff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] fix up 'jk/pack-bitmap' branch
2013-11-07 22:19 ` Jeff King
2013-11-08 1:39 ` Vicent Martí
@ 2013-11-08 17:10 ` Torsten Bögershausen
2013-11-08 18:23 ` Ramsay Jones
2013-11-08 22:29 ` Jeff King
1 sibling, 2 replies; 10+ messages in thread
From: Torsten Bögershausen @ 2013-11-08 17:10 UTC (permalink / raw)
To: Jeff King, Ramsay Jones
Cc: Vicent Marti, Junio C Hamano, Torsten Bögershausen,
GIT Mailing-list
On 2013-11-07 23.19, Jeff King wrote:
> On Thu, Nov 07, 2013 at 09:58:02PM +0000, Ramsay Jones wrote:
>
>> These patches fix various errors/warnings on the cygwin, MinGW and
>> msvc builds, provoked by the jk/pack-bitmap branch.
>
> Thanks. Your timing is impeccable, as I was just sitting down to
> finalize the next re-roll. I'll add these in.
>
> -Peff
Side question:
Do we have enough test coverage for htonll()/ntohll(),
or do we want do the "module test" which I send a couple of days before ?
/Torsten
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] fix up 'jk/pack-bitmap' branch
2013-11-08 17:10 ` Torsten Bögershausen
@ 2013-11-08 18:23 ` Ramsay Jones
2013-11-08 22:29 ` Jeff King
1 sibling, 0 replies; 10+ messages in thread
From: Ramsay Jones @ 2013-11-08 18:23 UTC (permalink / raw)
To: Torsten Bögershausen, Jeff King
Cc: Vicent Marti, Junio C Hamano, GIT Mailing-list
On 08/11/13 17:10, Torsten Bögershausen wrote:
> On 2013-11-07 23.19, Jeff King wrote:
>> On Thu, Nov 07, 2013 at 09:58:02PM +0000, Ramsay Jones wrote:
>>
>>> These patches fix various errors/warnings on the cygwin, MinGW and
>>> msvc builds, provoked by the jk/pack-bitmap branch.
>>
>> Thanks. Your timing is impeccable, as I was just sitting down to
>> finalize the next re-roll. I'll add these in.
>>
>> -Peff
>
> Side question:
> Do we have enough test coverage for htonll()/ntohll(),
> or do we want do the "module test" which I send a couple of days before ?
Yes, sorry for not bringing that up; I didn't get to try (or even look at)
your test patch, because I couldn't 'git am' it. :(
I've been meaning to look into why that is, but just haven't had time yet.
(I think it may have something to do with your name - I've noticed in the
past that any mail with utf8 characters causes problems.)
However, I should have alerted Jeff to your patch; sorry about that!
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] fix up 'jk/pack-bitmap' branch
2013-11-08 17:10 ` Torsten Bögershausen
2013-11-08 18:23 ` Ramsay Jones
@ 2013-11-08 22:29 ` Jeff King
2013-11-09 11:35 ` Torsten Bögershausen
1 sibling, 1 reply; 10+ messages in thread
From: Jeff King @ 2013-11-08 22:29 UTC (permalink / raw)
To: Torsten Bögershausen
Cc: Ramsay Jones, Vicent Marti, Junio C Hamano, GIT Mailing-list
On Fri, Nov 08, 2013 at 06:10:30PM +0100, Torsten Bögershausen wrote:
> Side question:
> Do we have enough test coverage for htonll()/ntohll(),
> or do we want do the "module test" which I send a couple of days before ?
The series adds tests for building and using the ewah bitmaps, which in
turn rely on the htonll code. So they are being tested in the existing
series.
-Peff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] fix up 'jk/pack-bitmap' branch
2013-11-08 22:29 ` Jeff King
@ 2013-11-09 11:35 ` Torsten Bögershausen
2013-11-09 17:25 ` Johannes Sixt
0 siblings, 1 reply; 10+ messages in thread
From: Torsten Bögershausen @ 2013-11-09 11:35 UTC (permalink / raw)
To: Jeff King, Torsten Bögershausen
Cc: Ramsay Jones, Vicent Marti, Junio C Hamano, GIT Mailing-list
On 2013-11-08 23.29, Jeff King wrote:
> On Fri, Nov 08, 2013 at 06:10:30PM +0100, Torsten Bögershausen wrote:
>
>> Side question:
>> Do we have enough test coverage for htonll()/ntohll(),
>> or do we want do the "module test" which I send a couple of days before ?
>
> The series adds tests for building and using the ewah bitmaps, which in
> turn rely on the htonll code. So they are being tested in the existing
> series.
>
> -Peff
You are thinking about t5310-pack-bitmaps.sh ?
If I do like this in compat/bswap.h
# define ntohll(n) (n)
# define htonll(n) (n)
(on an Intel processor, little endian)
then t5310 passes, even if the uint64_t words are written
in little endian to disc instead of big endian.
What do I miss?
/torsten
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] fix up 'jk/pack-bitmap' branch
2013-11-09 11:35 ` Torsten Bögershausen
@ 2013-11-09 17:25 ` Johannes Sixt
2013-11-09 21:03 ` Thomas Rast
0 siblings, 1 reply; 10+ messages in thread
From: Johannes Sixt @ 2013-11-09 17:25 UTC (permalink / raw)
To: Torsten Bögershausen, Jeff King
Cc: Ramsay Jones, Vicent Marti, Junio C Hamano, GIT Mailing-list
Am 09.11.2013 12:35, schrieb Torsten Bögershausen:
> On 2013-11-08 23.29, Jeff King wrote:
>> On Fri, Nov 08, 2013 at 06:10:30PM +0100, Torsten Bögershausen wrote:
>>
>>> Side question:
>>> Do we have enough test coverage for htonll()/ntohll(),
>>> or do we want do the "module test" which I send a couple of days before ?
>>
>> The series adds tests for building and using the ewah bitmaps, which in
>> turn rely on the htonll code. So they are being tested in the existing
>> series.
>>
>> -Peff
> You are thinking about t5310-pack-bitmaps.sh ?
> If I do like this in compat/bswap.h
>
> # define ntohll(n) (n)
> # define htonll(n) (n)
> (on an Intel processor, little endian)
>
> then t5310 passes, even if the uint64_t words are written
> in little endian to disc instead of big endian.
Of course. You write little endian and also read back little endian;
that should work just fine, no?
OTOH, if you write with Intel and read with PPC, then you should observe
misbehavior with the above patch.
-- Hannes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] fix up 'jk/pack-bitmap' branch
2013-11-09 17:25 ` Johannes Sixt
@ 2013-11-09 21:03 ` Thomas Rast
2013-11-09 21:21 ` Jeff King
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Rast @ 2013-11-09 21:03 UTC (permalink / raw)
To: Johannes Sixt
Cc: Torsten Bögershausen, Jeff King, Ramsay Jones, Vicent Marti,
Junio C Hamano, GIT Mailing-list
Johannes Sixt <j6t@kdbg.org> writes:
> Am 09.11.2013 12:35, schrieb Torsten Bögershausen:
>>
>> If I do like this in compat/bswap.h
>>
>> # define ntohll(n) (n)
>> # define htonll(n) (n)
>> (on an Intel processor, little endian)
>>
>> then t5310 passes, even if the uint64_t words are written
>> in little endian to disc instead of big endian.
>
> Of course. You write little endian and also read back little endian;
> that should work just fine, no?
>
> OTOH, if you write with Intel and read with PPC, then you should observe
> misbehavior with the above patch.
Maybe you could check in a simple test that the bitmap for a very
predictable pack (e.g. only one commit) has a certain content, by
checking its hash. That would guard against accidental format changes.
--
Thomas Rast
tr@thomasrast.ch
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] fix up 'jk/pack-bitmap' branch
2013-11-09 21:03 ` Thomas Rast
@ 2013-11-09 21:21 ` Jeff King
0 siblings, 0 replies; 10+ messages in thread
From: Jeff King @ 2013-11-09 21:21 UTC (permalink / raw)
To: Thomas Rast
Cc: Johannes Sixt, Torsten Bögershausen, Ramsay Jones,
Vicent Marti, Junio C Hamano, GIT Mailing-list
On Sat, Nov 09, 2013 at 10:03:56PM +0100, Thomas Rast wrote:
> > Of course. You write little endian and also read back little endian;
> > that should work just fine, no?
> >
> > OTOH, if you write with Intel and read with PPC, then you should observe
> > misbehavior with the above patch.
>
> Maybe you could check in a simple test that the bitmap for a very
> predictable pack (e.g. only one commit) has a certain content, by
> checking its hash. That would guard against accidental format changes.
Another option would be to cross-check reading and writing against JGit,
which is valuable for other reasons besides checking endianness. I do
not think most people will have JGit installed, but it's better than
nothing (and if even one person runs it, we have a chance of finding a
bug).
-Peff
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-11-09 21:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07 21:58 [PATCH 0/5] fix up 'jk/pack-bitmap' branch Ramsay Jones
2013-11-07 22:19 ` Jeff King
2013-11-08 1:39 ` Vicent Martí
2013-11-08 17:10 ` Torsten Bögershausen
2013-11-08 18:23 ` Ramsay Jones
2013-11-08 22:29 ` Jeff King
2013-11-09 11:35 ` Torsten Bögershausen
2013-11-09 17:25 ` Johannes Sixt
2013-11-09 21:03 ` Thomas Rast
2013-11-09 21:21 ` Jeff King
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).