aboutsummaryrefslogtreecommitdiff
path: root/src/cmd_manipulate.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-05-19 18:00:16 -0400
committerYour Name <you@example.com>2021-05-19 18:00:16 -0400
commitbe88609c825e18201f240415fe74a31c1a789484 (patch)
tree8b051262fcd9e1388ba45f14369112d3d9fb0d52 /src/cmd_manipulate.cc
parent38e33d8756a5b652965be8ada478b5c4238b857c (diff)
downloaddmtool-be88609c825e18201f240415fe74a31c1a789484.tar.gz
dmtool-be88609c825e18201f240415fe74a31c1a789484.tar.bz2
dmtool-be88609c825e18201f240415fe74a31c1a789484.zip
Added git command; refactoring
Diffstat (limited to 'src/cmd_manipulate.cc')
-rw-r--r--src/cmd_manipulate.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd_manipulate.cc b/src/cmd_manipulate.cc
index 9fc019e..2dff5e1 100644
--- a/src/cmd_manipulate.cc
+++ b/src/cmd_manipulate.cc
@@ -246,4 +246,10 @@ namespace cmd {
utils::saveJson(*c, p);
return text.str();
}
+
+ std::string git(std::vector<std::string> args) {
+ std::string root = getTruePath("").string();
+ std::system(("cd " + root + " && " + utils::join(args, " ")).c_str());
+ return "";
+ }
}