output(o, 3, _("Fast-forwarding submodule %s to the following commit:"), path);
output_commit_title(o, commit_b);
} else if (show(o, 2))
- output(o, 2, _("Fast-forwarding submodule %s to %s"), path, oid_to_hex(b));
+ output(o, 2, _("Fast-forwarding submodule %s"), path);
else
; /* no output */
output(o, 3, _("Fast-forwarding submodule %s to the following commit:"), path);
output_commit_title(o, commit_a);
} else if (show(o, 2))
- output(o, 2, _("Fast-forwarding submodule %s to %s"), path, oid_to_hex(a));
+ output(o, 2, _("Fast-forwarding submodule %s"), path);
else
; /* no output */
static struct dir_rename_entry *check_dir_renamed(const char *path,
struct hashmap *dir_renames)
{
- char temp[PATH_MAX];
+ char *temp = xstrdup(path);
char *end;
- struct dir_rename_entry *entry;
+ struct dir_rename_entry *entry = NULL;;
- strcpy(temp, path);
while ((end = strrchr(temp, '/'))) {
*end = '\0';
entry = dir_rename_find_entry(dir_renames, temp);
if (entry)
- return entry;
+ break;
}
- return NULL;
+ free(temp);
+ return entry;
}
static void compute_collisions(struct hashmap *collisions,