X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin-add.c;h=cb6e5906fb76f2460f212c54b557e5ae0ce23579;hb=410e99fadf25b65b70d9bf90fd8bd5a5d1ea3c8a;hp=c422a62f32eda6b9e45bb2c7f8a26c32896f3f39;hpb=46b5139cae7306194a39fdaf5c6abc12ab531c84;p=git.git diff --git a/builtin-add.c b/builtin-add.c index c422a62f3..cb6e5906f 100644 --- a/builtin-add.c +++ b/builtin-add.c @@ -105,8 +105,8 @@ static void refresh(int verbose, const char **pathspec) for (specs = 0; pathspec[specs]; specs++) /* nothing */; seen = xcalloc(specs, 1); - refresh_index(&the_index, verbose ? REFRESH_SAY_CHANGED : REFRESH_QUIET, - pathspec, seen); + refresh_index(&the_index, verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET, + pathspec, seen, "Unstaged changes after refreshing the index:"); for (i = 0; i < specs; i++) { if (!seen[i]) die("pathspec '%s' did not match any files", pathspec[i]); @@ -198,7 +198,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix) out = open(file, O_CREAT | O_WRONLY, 0644); if (out < 0) die ("Could not open '%s' for writing.", file); - rev.diffopt.file = fdopen(out, "w"); + rev.diffopt.file = xfdopen(out, "w"); rev.diffopt.close_file = 1; if (run_diff_files(&rev, 0)) die ("Could not write patch");