Добавлена новая команда size для получения информации и размере репозитория с хранимыми снимками

This commit is contained in:
Alexander Zhirov 2025-05-29 16:23:47 +03:00
parent 795fb0bdc4
commit 60139a1874
Signed by: alexander
GPG key ID: C8D8BE544A27C511
2 changed files with 12 additions and 2 deletions

View file

@ -40,6 +40,7 @@ int main(string[] args)
)
.add(new Command("status", "Checking the status of tracked files"))
.add(new Command("diff", "Show changed data"))
.add(new Command("size", "Size of snapshots"))
.add(new Command("import", "Import snapshot from a tar.gz archive")
.add(new Argument("archive", "The path to the tar.gz archive file").required)
.add(new Option("c", "comment", "Specify comment")
@ -138,7 +139,7 @@ int main(string[] args)
.optional
)
)
.add(new Option("c", "config", "Сonfiguration file path")
.add(new Option("c", "config", "Configuration file path")
.optional
.validateEachWith(
opt => opt.exists && opt.isFile,
@ -168,6 +169,9 @@ int main(string[] args)
.on("diff", diff =>
snag.diff()
)
.on("size", size =>
snag.size()
)
.on("status", status =>
snag.status()
)
@ -231,6 +235,12 @@ int main(string[] args)
} catch (SnagException e) {
e.print();
return EXIT_FAILURE;
} catch (Exception e) {
writeln(
"AN UNEXPECTED ERROR HAS OCCURRED! PLEASE REPORT IT TO THE AUTHOR OF THE SNAG!\n\n",
e
);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;

View file

@ -1,3 +1,3 @@
module snag.version_;
enum snagVersion = "0.0.12";
enum snagVersion = "0.0.13";