View raw

1 (** The [ogit] executable. 2 3 Parses arguments and delegates to {!Ogit.Main.run}. [--git-project-root] 4 overrides the configured repository root and is enough to run without any 5 config file, which is what makes a bare [ogit --git-project-root .] usable 6 for a quick look at a local checkout. *) 7 8 let usage = "Usage: ogit [--git-project-root <path>]" 9 10 let () = 11 let git_project_root = ref None in 12 let speclist = 13 [ 14 ( "--git-project-root", 15 Arg.String (fun path -> git_project_root := Some path), 16 "<path> Root directory containing Git repositories" ); 17 ] 18 in 19 Arg.parse speclist (fun _ -> ()) usage; 20 Ogit.Main.run ?git_project_root:!git_project_root () 21