- const char *diff_cmd = "diff -L%s%s -L%s%s";
- const char *diff_arg = "%s %s||:"; /* "||:" is to return 0 */
+ const char *const diff_cmd = "diff -L%s%s -L%s%s";
+ const char *const diff_arg = "%s %s||:"; /* "||:" is to return 0 */
{
if (s->should_free)
free(s->data);
else if (s->should_munmap)
munmap(s->data, s->size);
{
if (s->should_free)
free(s->data);
else if (s->should_munmap)
munmap(s->data, s->size);
- builtin_diff(name, other ? : name, temp, xfrm_msg,
+ builtin_diff(name, othername, temp, xfrm_msg,
if (strchr(p->one->path, line_termination) ||
strchr(p->one->path, inter_name_termination))
die(err, p->one->path);
if (strchr(p->one->path, line_termination) ||
strchr(p->one->path, inter_name_termination))
die(err, p->one->path);
void diff_debug_filespec(struct diff_filespec *s, int x, const char *one)
{
fprintf(stderr, "queue[%d] %s (%s) %s %06o %s\n",
void diff_debug_filespec(struct diff_filespec *s, int x, const char *one)
{
fprintf(stderr, "queue[%d] %s (%s) %s %06o %s\n",
s->path,
DIFF_FILE_VALID(s) ? "valid" : "invalid",
s->mode,
s->sha1_valid ? sha1_to_hex(s->sha1) : "");
fprintf(stderr, "queue[%d] %s size %lu flags %d\n",
s->path,
DIFF_FILE_VALID(s) ? "valid" : "invalid",
s->mode,
s->sha1_valid ? sha1_to_hex(s->sha1) : "");
fprintf(stderr, "queue[%d] %s size %lu flags %d\n",
diff_debug_filespec(p->one, i, "one");
diff_debug_filespec(p->two, i, "two");
fprintf(stderr, "score %d, status %c stays %d broken %d\n",
diff_debug_filespec(p->one, i, "one");
diff_debug_filespec(p->two, i, "two");
fprintf(stderr, "score %d, status %c stays %d broken %d\n",