summaryrefslogtreecommitdiff
path: root/show-index.c
AgeCommit message (Collapse)AuthorFilesLines
2010-01-21slim down "git show-index"Libravatar Linus Torvalds1-1/+1
As the documentation says, this is primarily for debugging, and in the longer term we should rename it to test-show-index or something. In the meantime, just avoid xmalloc (which slurps in the rest of git), and separating out the trivial hex functions into "hex.o". This results in [torvalds@nehalem git]$ size git-show-index text data bss dec hex filename 222818 2276 112688 337782 52776 git-show-index (before) 5696 624 1264 7584 1da0 git-show-index (after) which is a whole lot better. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git show-index -h'Libravatar Jonathan Nieder1-0/+5
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05Fix some warnings (on cygwin) to allow -WerrorLibravatar Ramsay Jones1-1/+2
When printing valuds of type uint32_t, we should use PRIu32, and should not assume that it is unsigned int. On 32-bit platforms, it could be defined as unsigned long. The same caution applies to ntohl(). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-21Use PRIuMAX instead of 'unsigned long long' in show-indexLibravatar Shawn O. Pearce1-1/+1
Elsewhere in Git we already use PRIuMAX and cast to uintmax_t when we need to display a value that is 'very big' and we're not exactly sure what the largest display size is for this platform. This particular fix is needed so we can do the incredibly crazy temporary hack of: diff --git a/cache.h b/cache.h index e0abcd6..6637fd8 100644 --- a/cache.h +++ b/cache.h @@ -6,6 +6,7 @@ #include SHA1_HEADER #include <zlib.h> +#define long long long #if ZLIB_VERNUM < 0x1200 #define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11) allowing us to more easily look for locations where we are passing a pointer to an 8 byte value to a function that expects a 4 byte value. This can occur on some platforms where sizeof(long) == 8 and sizeof(size_t) == 4. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-04-10show-index.c: learn about index v2Libravatar Nicolas Pitre1-9/+59
When index v2 is encountered, the CRC32 of each object is also displayed in parenthesis at the end of the line. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-20Fix typo in show-index.cLibravatar Lars Hjemli1-1/+1
Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-05Add a "git-show-index" helper that shows the contents of a pack indexLibravatar Linus Torvalds1-0/+28
This was invaluable for debugging the zero-sized compression issue, and might be useful for scripting too, if people want to see the contents of a pack.