Ignore manifest.xml for timestamp updates.
Change-Id: I8b58f739c91e4c4c6e4d5389b27b544963c0c235
diff --git a/cmd/gitfs-populate/main.go b/cmd/gitfs-populate/main.go
index 33c00b0..737a4c8 100644
--- a/cmd/gitfs-populate/main.go
+++ b/cmd/gitfs-populate/main.go
@@ -224,6 +224,9 @@
data := make([]byte, 1024)
if err := filepath.Walk(dir, func(n string, fi os.FileInfo, err error) error {
+ if n == filepath.Join(dir, "manifest.xml") {
+ return nil
+ }
if fi.Mode()&os.ModeType != 0 {
return nil
}
diff --git a/cmd/gitfs-populate/main_test.go b/cmd/gitfs-populate/main_test.go
index 1437b74..6a4159f 100644
--- a/cmd/gitfs-populate/main_test.go
+++ b/cmd/gitfs-populate/main_test.go
@@ -149,8 +149,10 @@
func TestChangedFiles(t *testing.T) {
dir, err := createFSTree([]string{
+ "r1/manifest.xml",
"r1/a",
"r1/b",
+ "r2/manifest.xml",
"r2/a",
"r2/b",
"r2/c",
@@ -160,8 +162,10 @@
}
ck2 := "3f75526aa8f01eea5d76cee10722195dc73676df"
- if err := syscall.Setxattr(filepath.Join(dir, "r2/b"), attr, []byte(ck2), 0); err != nil {
- t.Fatalf("Setxattr: %v", err)
+ for _, changed := range []string{"r2/b", "r2/manifest.xml"} {
+ if err := syscall.Setxattr(filepath.Join(dir, changed), attr, []byte(ck2), 0); err != nil {
+ t.Fatalf("Setxattr: %v", err)
+ }
}
got, err := changedFiles(filepath.Join(dir, "r1"), filepath.Join(dir, "r2"))