This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Another contrib patch


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]