diff options
author | Erich Eckner <git@eckner.net> | 2018-02-22 17:18:50 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-22 17:18:50 +0100 |
commit | 281ea5eb2424f8ec494cb76bb298e178e78a4cc1 (patch) | |
tree | 045a6ce3d0130999e1ef218dcaf86a5519dc0525 /gitupdateunit.pas | |
parent | 57d2f87e6b20b256f74eb87bcd72d9866776be1f (diff) | |
download | units-281ea5eb2424f8ec494cb76bb298e178e78a4cc1.tar.xz |
gitupdateunit.pas: --porcellain fuer gitv0.2.2
Diffstat (limited to 'gitupdateunit.pas')
-rw-r--r-- | gitupdateunit.pas | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gitupdateunit.pas b/gitupdateunit.pas index 842ba77..66d0201 100644 --- a/gitupdateunit.pas +++ b/gitupdateunit.pas @@ -27,14 +27,20 @@ initialization output:=''; for i:=0 to length(gitDirs)-1 do begin + updated:=updated or (sourceSha512Sum(gitDirs[i])<>binarySha512Sum(i)); + setLength(args,3); + args[0]:='status'; + args[1]:='-sb'; + args[2]:='--porcelain'; + if not runCommandInDir(gitDirs[i],'git',args,output) then continue; + output:=trim(output); + if pos(' [behind ',output)=0 then + continue; setLength(args,2); args[0]:='pull'; args[1]:='--all'; if not runCommandInDir(gitDirs[i],'git',args,output) then continue; - output:=trim(output); - while pos(#10,output)>0 do - erstesArgument(output,#10); - updated:=updated or (output<>'Already up-to-date.') or (sourceSha512Sum(gitDirs[i])<>binarySha512Sum(i)); + updated:=true; end; if updated then refreshExecutable(gitDirs); |