Re: How can I tell if anything was fetched?

2012-10-12 Thread Johannes Sixt
Am 10/11/2012 18:25, schrieb Phil Lawrence: What is the best way to know whether or not anything was received during the fetch? I don't want to be stuck trying to parse the answer out of STDOUT and STDERR... what=--all # or --remotes=the-remote presha1s=$(git rev-parse $what) git fetch

Re: How can I tell if anything was fetched?

2012-10-11 Thread Andreas Schwab
Phil Lawrence prlawre...@gmail.com writes: One approach might be to first generate a state-of-the-repo SHA1: # http://stackoverflow.com/a/7350019/834039 # http://git-scm.com/book/ch9-2.html { git rev-list --objects --all git rev-list --objects -g --no-walk --all

Re: How can I tell if anything was fetched?

2012-10-11 Thread Enrico Weigelt
I think you'd only need to record the state of all refs (eg. the output of `git for-each-ref') to reliably detect any changes. I would just record the output of `git ls-remote . | sort -u` somewhere and compare it next time (maybe you even wanna grep for the desired ref namespaces). cu --