I am calling git pull
using ProcessInfo
I am checking ExitCode
for all the commands for there success.
So if ExitCode
is 0 the command ran successfully if not there is some error.
All works fine, the problem occurs when it tries to do a git pull
and the repository is already up to date.
In that case git considers it a fail and so returns ExitCode=1
, but for me it is a success, it is just that there was nothing to be pulled.
Is there any way I can check the success of pull command?
I have one approach in mind that if I can somehow run a command to check if there is anything to be pulled, if that command returns true then I will do a pull else won't
This post gives the option to check if anything is there to be pulled Check if pull needed in Git
Can somebody help if there is direct way to handle pull alone or what should I check before pull?