Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754931AbcCRRBb (ORCPT ); Fri, 18 Mar 2016 13:01:31 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:32913 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754484AbcCRRB0 (ORCPT ); Fri, 18 Mar 2016 13:01:26 -0400 MIME-Version: 1.0 In-Reply-To: References: <56EB9B0C.4050507@nvidia.com> Date: Fri, 18 Mar 2016 10:01:25 -0700 X-Google-Sender-Auth: GQCbI1I80zdGGEWJBvKjSbNMCuo Message-ID: Subject: Re: [GIT PULL] GPIO bulk changes for kernel v4.6 From: Linus Torvalds To: Junio C Hamano Cc: Johannes Schindelin , Laxman Dewangan , Linus Walleij , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , Git Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 40 On Fri, Mar 18, 2016 at 9:37 AM, Junio C Hamano wrote: > >> I don't think the original "resolve" did it, for example. You can't do >> a three-way merge without a base. > > Yes, and that continues to this day: Yeah, "octopus" also refuses it cleanly: common=$(git merge-base --all $SHA1 $MRC) || die "Unable to find common commit with $pretty_name" The code in the recursive merge that allows this to happen is this: if (merged_common_ancestors == NULL) { /* if there is no common ancestor, use an empty tree */ struct tree *tree; tree = lookup_tree(EMPTY_TREE_SHA1_BIN); merged_common_ancestors = make_virtual_commit(tree, "ancestor"); } so the "no common ancestors" is just considered to be an empty merge base. And I do think that's right, and I think it's clever, and it goes back to 2006: 934d9a24078e merge-recur: if there is no common ancestor, fake empty one but I think there should be an option there. > This is a tangent but I wonder if we should say why we refuse to > the standard error before calling these two "exit"s. As mentioned, Octopus does. That said, there's probably no reason to ever use the old three-way merge, so I'm not even sure it's worth fixing the old git-merge-resolve. Linus