From: Arvin Schnell Date: Wed, 27 Apr 2011 07:39:05 +0000 (+0200) Subject: - run diff with --new-file X-Git-Tag: v0.1.3~397 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23b40f44552ea1d8ed61e414c8304c62703c58a1;p=thirdparty%2Fsnapper.git - run diff with --new-file --- diff --git a/snapper/File.cc b/snapper/File.cc index 5ce1628a..46e23ce4 100644 --- a/snapper/File.cc +++ b/snapper/File.cc @@ -367,8 +367,6 @@ namespace snapper vector File::getDiff(const string& options) const { - // TODO check for created/deleted - SystemCmd cmd(DIFFBIN " " + options + " " + quote(getAbsolutePath(LOC_PRE)) + " " + quote(getAbsolutePath(LOC_POST))); return cmd.stdout(); diff --git a/tools/snapper.cc b/tools/snapper.cc index 46a97f66..5bc116dd 100644 --- a/tools/snapper.cc +++ b/tools/snapper.cc @@ -411,7 +411,7 @@ command_diff() } else { - vector lines = tmp->getDiff("-u"); + vector lines = tmp->getDiff("--unified --new-file"); for (vector::const_iterator it = lines.begin(); it != lines.end(); ++it) fprintf(file, "%s\n", it->c_str()); }