From: Arvin Schnell Date: Thu, 27 Feb 2014 13:40:52 +0000 (+0100) Subject: - documented status characters X-Git-Tag: v0.2.2~15^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a970d645ad5202a6abfb2a5098e6ac99c3c78733;p=thirdparty%2Fsnapper.git - documented status characters --- diff --git a/doc/snapper.xml.in b/doc/snapper.xml.in index ef99d164..c2f4e569 100644 --- a/doc/snapper.xml.in +++ b/doc/snapper.xml.in @@ -422,6 +422,38 @@ + The output consists of a string encoding the status followed by + the filename. The characters of the status string are: + + + A "+" means the file was + created, a "-" means the file was deleted. A + "c" means the content of the file has changed + and a "t" means the type of the file has + changed (e.g. from regular file to directory). + + + A "p" means the permissions + are have changed. + + + An "u" means the user + ownership has changed. + + + A "g" means the group + ownership has changed. + + + A "x" means the extended + attribute information has changed. + + + An "a" means the ACL + information has changed. + + + If there is no change a "." is outputted. @@ -462,11 +494,9 @@ - Compare the extended attributes between snapshot number1 and number2. See examples below: - +:user.foo for created attributes diff --git a/snapper/File.cc b/snapper/File.cc index b328c73d..6da3f0da 100644 --- a/snapper/File.cc +++ b/snapper/File.cc @@ -742,6 +742,9 @@ namespace snapper string statusToString(unsigned int status) { + // If possible keep the characters in sync with e.g. rpm or + // rsync. Unfortunately rpm and rsync are not consistent. + string ret; if (status & CREATED) @@ -789,7 +792,7 @@ namespace snapper if (str.length() >= 3) { - if (str[2] == 'u' || str[2] == 'o') + if (str[2] == 'u') ret |= OWNER; }