From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: What's cooking in git.git (topics) Date: Fri, 18 Jul 2008 22:32:10 -0700 Message-ID: <7vabge30dh.fsf@gitster.siamese.dyndns.org> References: <7vr69r8sqk.fsf@gitster.siamese.dyndns.org> <7vlk01hqzz.fsf@gitster.siamese.dyndns.org> <20080718175040.6117@nanako3.lavabit.com> <20080718182010.6117@nanako3.lavabit.com> <7v63r38r4r.fsf@gitster.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Nanako Shiraishi , git@vger.kernel.org To: Johannes Schindelin X-From: git-owner@vger.kernel.org Sat Jul 19 07:33:39 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1KK54c-0004Vt-St for gcvg-git-2@gmane.org; Sat, 19 Jul 2008 07:33:39 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750954AbYGSFck convert rfc822-to-quoted-printable (ORCPT ); Sat, 19 Jul 2008 01:32:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750719AbYGSFck (ORCPT ); Sat, 19 Jul 2008 01:32:40 -0400 Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:42968 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750704AbYGSFcj convert rfc822-to-8bit (ORCPT ); Sat, 19 Jul 2008 01:32:39 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 6DAFE2AFEB; Sat, 19 Jul 2008 01:32:35 -0400 (EDT) Received: from pobox.com (ip68-225-240-77.oc.oc.cox.net [68.225.240.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 594C62AFE5; Sat, 19 Jul 2008 01:32:16 -0400 (EDT) User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Pobox-Relay-ID: 175A1992-5554-11DD-A721-3113EBD4C077-77302942!a-sasl-quonix.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Johannes Schindelin writes: > On Fri, 18 Jul 2008, Junio C Hamano wrote: > >> +The 'recursive' strategy can take the following options: >> + >> +ours;; > > You still have not addressed the issue that you can specify multiple=20 > strategies,... Even though multiple -s parameters are supported, I know you have been here long enough in git scene to remember how it came about. I've seen some third-party documents that talk about our ability to "try multiple strategies and pick the best one" as one of the unique features, but anybody who was there knows that it was just a failed experiment that w= e did not bother removing. The thing is, trying multiple strategies was a cute idea and it was qui= te straightforward to implement. But picking the best one is the much mor= e important part, and judging whose result is the best shouldn't be done with just a na=C3=AFve "how many conflicting paths remain there?" metri= c (c.f. $gmane/87297 which talks about "stupid" but the argument is exact= ly the same --- smaller number of conflicts may not necessarily be the easiest to resolve nor the right resolution). I would be surprised if anybody uses multiple -s options in their daily workflow, even though I would not be surprised if people tried to use it just as an experiment = and for its entertainment value once or maybe twice. After all, I invented the multiple strategy support for amusement, not from any practical rea= l world needs ;-) So I do not consider that a convincing argument at all. > ... or even a single _wrong_ one. So: > > $ git merge -s stupid -Xours > > would not fail at all, but definitely not do the right thing either (= it=20 > disobeys a direct command of the user). It does fail gracefully, though. $ git merge -s resolve -Xours next Trying really trivial in-index merge... error: Untracked working tree file '.gitattributes' would be overwr= itten by merge. Nope. fatal: Not a valid object name --ours Merge with strategy resolve failed. I consider this falls into "You say it hurts? Don't do that, then" category. The error message will naturally improve, once we teach the merge strat= egy backends that they can be given --