diff --git a/gitcount b/gitcount new file mode 100755 index 000000000..07d6c7942 Binary files /dev/null and b/gitcount differ diff --git a/gitcount.pas b/gitcount.pas new file mode 100644 index 000000000..1bda41d07 --- /dev/null +++ b/gitcount.pas @@ -0,0 +1,23 @@ +program GitFileCount; + +uses + Process, SysUtils, Classes; + +var + AProcess: TProcess; + OutputString: TStringList; +begin + AProcess := TProcess.Create(nil); + OutputString := TStringList.Create; + + AProcess.Executable := 'git'; + AProcess.Parameters.Add('ls-files'); + AProcess.Options := [poUsePipes, poWaitOnExit]; + AProcess.Execute; + + OutputString.LoadFromStream(AProcess.Output); + Writeln(OutputString.Count); + + AProcess.Free; + OutputString.Free; +end. \ No newline at end of file