]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- run diff with --new-file
authorArvin Schnell <aschnell@suse.de>
Wed, 27 Apr 2011 07:39:05 +0000 (09:39 +0200)
committerArvin Schnell <aschnell@suse.de>
Wed, 27 Apr 2011 07:39:05 +0000 (09:39 +0200)
snapper/File.cc
tools/snapper.cc

index 5ce1628a0c01bc3b69ed97b783d25957313c965f..46e23ce448c4cf2ab126f294e594b744248bee8d 100644 (file)
@@ -367,8 +367,6 @@ namespace snapper
     vector<string>
     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();
index 46a97f66b5a41ece70b4f6e11a0ddeada74fedde..5bc116dd4934749030f9473c9ba956475cbac63e 100644 (file)
@@ -411,7 +411,7 @@ command_diff()
     }
     else
     {
-       vector<string> lines = tmp->getDiff("-u");
+       vector<string> lines = tmp->getDiff("--unified --new-file");
        for (vector<string>::const_iterator it = lines.begin(); it != lines.end(); ++it)
            fprintf(file, "%s\n", it->c_str());
     }