Another contrib patch

Paolo Bonzini bonzini@gnu.org
Wed Jun 2 13:07:00 GMT 2010


On 06/02/2010 02:56 PM, Tobias Burnus wrote:
> Hi Paolo,
>
> On 06/02/2010 12:26 PM, Paolo Bonzini wrote:
> [...]
>
> since you seemingly also review ./contrib/ patches... I recently saw the
> following - still unreviewed - patch by Bernhard, which I like:
>
> http://gcc.gnu.org/ml/gcc-patches/2010-05/msg01371.html
> Re: [PATCH] gcc_update: support updating a git clone

Ok with one change.  Here:

+  $GCC_GIT stash ${silent+-q}
+  $GCC_GIT pull ${silent+-q} --rebase ${1+"$@"}
+  ret=$?
+  $GCC_GIT stash ${silent+-q} pop
+  if [ $ret -ne 0 ]; then

change it to something like this:

   $GCC_GIT diff -q HEAD || {
       echo "updating dirty git tree, commit your changes and retry." >&2
       exit 1
   fi
   $GCC_GIT pull ${silent+-q} --rebase ${1+"$@"}
   if [ $? != 0 ]; then

Because if the rebase has failed and has conflict marks, chances are a 
conflicting stash pop would mess up things even more.  People should 
just enjoy their distributed VCS instead.

Paolo



More information about the Gcc-patches mailing list