projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the simple scripts I used to do a merge with content conflicts.
[git.git]
/
show-diff.c
diff --git
a/show-diff.c
b/show-diff.c
index
0af2f10
..
36afb3c
100644
(file)
--- a/
show-diff.c
+++ b/
show-diff.c
@@
-4,7
+4,6
@@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
-#include <ctype.h>
static char *diff_cmd = "diff -L '%s' -u -N - '%s'";
static char *diff_cmd = "diff -L '%s' -u -N - '%s'";
@@
-28,8
+27,8
@@
static char *sq_expand(char *src)
int cnt, c;
char *cp;
int cnt, c;
char *cp;
- /* count
single quote characters
*/
- for (cnt =
0
, cp = src; *cp; cnt++, cp++)
+ /* count
bytes needed to store the quoted string.
*/
+ for (cnt =
1
, cp = src; *cp; cnt++, cp++)
if (*cp == '\'')
cnt += 3;
if (*cp == '\'')
cnt += 3;