Re: git-pull (or cg-fetch?) with exit status

From: Randal L. Schwartz <merlyn@stonehenge.com>
Date: 2005-10-31 07:05:45
>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:

Junio> 	old_head=$(git-rev-parse --verify HEAD) &&
Junio>         git-pull -n >/dev/null 2>&1 || exit
Junio>         new_head=$(git-rev-parse --verify HEAD)
Junio> 	test "$old_head" = "$new_head" || make test install

This looks like it might work.  I'll try it out next time.  Thanks.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Oct 31 07:06:27 2005

This archive was generated by hypermail 2.1.8 : 2005-10-31 07:06:33 EST