Explorar o código

Git annex init without args

Will now initialise to version 8, which fixes some of the smaller issues
with version 7.
Achilleas Koutsou %!s(int64=5) %!d(string=hai) anos
pai
achega
739b1d4f82
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      internal/db/models_gin.go

+ 4 - 4
internal/db/models_gin.go

@@ -71,7 +71,7 @@ func RebuildIndex() error {
 }
 }
 
 
 func annexUninit(path string) {
 func annexUninit(path string) {
-	// walker sets the permission for any file found to 0600, to allow deletion
+	// walker sets the permission for any file found to 0660, to allow deletion
 	var mode os.FileMode
 	var mode os.FileMode
 	walker := func(path string, info os.FileInfo, err error) error {
 	walker := func(path string, info os.FileInfo, err error) error {
 		if info == nil {
 		if info == nil {
@@ -102,18 +102,18 @@ func annexSetup(path string) {
 	log.Trace("Running annex add (with filesize filter) in '%s'", path)
 	log.Trace("Running annex add (with filesize filter) in '%s'", path)
 
 
 	// Initialise annex in case it's a new repository
 	// Initialise annex in case it's a new repository
-	if msg, err := annex.Init(path, "--version=7"); err != nil {
+	if msg, err := annex.Init(path); err != nil {
 		log.Error(2, "Annex init failed: %v (%s)", err, msg)
 		log.Error(2, "Annex init failed: %v (%s)", err, msg)
 		return
 		return
 	}
 	}
 
 
-	// Upgrade to v7 in case the directory was here before and wasn't cleaned up properly
+	// Upgrade to v8 in case the directory was here before and wasn't cleaned up properly
 	if msg, err := annex.Upgrade(path); err != nil {
 	if msg, err := annex.Upgrade(path); err != nil {
 		log.Error(2, "Annex upgrade failed: %v (%s)", err, msg)
 		log.Error(2, "Annex upgrade failed: %v (%s)", err, msg)
 		return
 		return
 	}
 	}
 
 
-	// Enable addunlocked for annex v7
+	// Enable addunlocked for annex v8
 	if msg, err := annex.SetAddUnlocked(path); err != nil {
 	if msg, err := annex.SetAddUnlocked(path); err != nil {
 		log.Error(2, "Failed to set 'addunlocked' annex option: %v (%s)", err, msg)
 		log.Error(2, "Failed to set 'addunlocked' annex option: %v (%s)", err, msg)
 	}
 	}