# # patch "commands.cc" # from [6a8057ff80970b10eb8804299985acf9a8b8af69] # to [177acfa9bb2a5e8a8eca4b8dd87b7e0feef7ff5b] # # patch "git_export.hh" # from [a53d5d2c3ffd4faed7ed24763fa7758a15bd7860] # to [cbd98c1b27e8e2efe1ec1054e564b20bbbaced11] # ======================================================================== --- commands.cc 6a8057ff80970b10eb8804299985acf9a8b8af69 +++ commands.cc 177acfa9bb2a5e8a8eca4b8dd87b7e0feef7ff5b @@ -3470,22 +3470,22 @@ if (args.size() < 2) throw usage(name); - vector::const_iterator i = args.begin(); - ++i; - vector removed (i, args.end()); if (idx(args, 0)() == "import") { if (args.size() > 2) throw usage(name); - import_git_repo(system_path(idx(removed, 0)), app); + import_git_repo(system_path(idx(args, 1)), app); } else if (idx(args, 0)() == "export") { if (args.size() > 3) throw usage(name); - export_git_repo(system_path(idx(removed, 0)), - args.size() == 3 ? idx(removed, 1) : "", - app); + if (args.size() == 3) + export_git_repo(system_path(idx(args, 1)), + idx(args, 2)(), app); + else + export_git_repo(system_path(idx(args, 1)), + "", app); } else throw usage(name); ======================================================================== --- git_export.hh a53d5d2c3ffd4faed7ed24763fa7758a15bd7860 +++ git_export.hh cbd98c1b27e8e2efe1ec1054e564b20bbbaced11 @@ -9,7 +9,8 @@ #include "vocab.hh" #include "database.hh" -void export_git_repo(system_path const & gitrepo, string const & headname, +void export_git_repo(system_path const & gitrepo, + std::string const & headname, app_state & app); #endif // __GIT_EXPORT_HH__