projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert the index file reading/writing to use network byte order.
[git.git]
/
show-diff.c
diff --git
a/show-diff.c
b/show-diff.c
index
21c9045
..
a15e9b4
100644
(file)
--- a/
show-diff.c
+++ b/
show-diff.c
@@
-5,7
+5,7
@@
*/
#include "cache.h"
*/
#include "cache.h"
-static void show_differences(char *name,
+static void show_differences(char *name,
void *old_contents, unsigned long long old_size)
{
static char cmd[1000];
void *old_contents, unsigned long long old_size)
{
static char cmd[1000];
@@
-33,7
+33,7
@@
static void show_diff_empty(struct cache_entry *ce)
printf("--- %s\n", ce->name);
printf("+++ /dev/null\n");
p = old;
printf("--- %s\n", ce->name);
printf("+++ /dev/null\n");
p = old;
- end = old + size;
+ end = old + size;
while (p < end)
if (*p++ == '\n')
lines ++;
while (p < end)
if (*p++ == '\n')
lines ++;
@@
-44,7
+44,7
@@
static void show_diff_empty(struct cache_entry *ce)
if (startline) {
putchar('-');
startline = 0;
if (startline) {
putchar('-');
startline = 0;
- }
+ }
putchar(c);
if (c == '\n')
startline = 1;
putchar(c);
if (c == '\n')
startline = 1;
@@
-90,7
+90,7
@@
int main(int argc, char **argv)
changed = cache_match_stat(ce, &st);
if (!changed)
continue;
changed = cache_match_stat(ce, &st);
if (!changed)
continue;
- printf("%.*s: ", ce
->namelen
, ce->name);
+ printf("%.*s: ", ce
_namelen(ce)
, ce->name);
for (n = 0; n < 20; n++)
printf("%02x", ce->sha1[n]);
printf("\n");
for (n = 0; n < 20; n++)
printf("%02x", ce->sha1[n]);
printf("\n");