From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: [PATCH 0/3] Reject non-ff pulls by default Date: Mon, 9 Sep 2013 16:53:49 -0400 Message-ID: <20130909205349.GA15506@sigill.intra.peff.net> References: <20130908172605.GF5359@vauxhall.crustytoothpaste.net> <20130909000153.GG5359@vauxhall.crustytoothpaste.net> <20130909195231.GA14021@sigill.intra.peff.net> <20130909202435.GJ2582@serenity.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: John Keeping , Junio C Hamano , Felipe Contreras , "brian m. carlson" , git@vger.kernel.org, Andreas Krey To: Matthieu Moy X-From: git-owner@vger.kernel.org Mon Sep 09 22:53:57 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VJ8T6-0006X3-Nz for gcvg-git-2@plane.gmane.org; Mon, 09 Sep 2013 22:53:57 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755489Ab3IIUxx (ORCPT ); Mon, 9 Sep 2013 16:53:53 -0400 Received: from cloud.peff.net ([50.56.180.127]:57926 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265Ab3IIUxw (ORCPT ); Mon, 9 Sep 2013 16:53:52 -0400 Received: (qmail 26022 invoked by uid 102); 9 Sep 2013 20:53:52 -0000 Received: from c-71-63-4-13.hsd1.va.comcast.net (HELO sigill.intra.peff.net) (71.63.4.13) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Mon, 09 Sep 2013 15:53:52 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Mon, 09 Sep 2013 16:53:49 -0400 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Mon, Sep 09, 2013 at 10:50:31PM +0200, Matthieu Moy wrote: > John Keeping writes: > > > I think we need to make sure that we give instructions for how to go > > back if the default hasn't done what you wanted. Something like this: > > > > Your pull did not fast-forward, so Git has merged '$upstream' into > > your branch, which may not be correct for your project. If you > > would rather rebase your changes, run > > > > git rebase > > > > See "pull.mode" in git-config(1) to suppress this message in the > > future. > > Sounds good to me. One option is to display the warning on the > command-line, and another option is to show it in COMMIT_EDITMSG (since > we now default to showing it even for non-conflicted merges). I hadn't though of that, but showing it in COMMIT_EDITMSG is a great moment, because you are notifying the user _before_ they create a merge commit. So the backout/switch procedure is "cancel this by giving an empty message, then re-run git pull --rebase". On the other hand, if we run into conflicts, you'd probably want to let them know before asking them to resolve them all. So perhaps a separate message would be needed for that case (to suggest "reset --merge && git pull --rebase"). -Peff