From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Palmer Subject: [PATCHv2 0/2] merge-tree: fix (merge-base a b) b a Date: Sun, 11 Jul 2010 14:16:53 +0100 Message-ID: <1278854215-9022-1-git-send-email-wmpalmer@gmail.com> Cc: wmpalmer@gmail.com, gitster@pobox.com To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Sun Jul 11 15:17:34 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OXwPW-0004JH-Fq for gcvg-git-2@lo.gmane.org; Sun, 11 Jul 2010 15:17:34 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754002Ab0GKNRH (ORCPT ); Sun, 11 Jul 2010 09:17:07 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:48017 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752138Ab0GKNRF (ORCPT ); Sun, 11 Jul 2010 09:17:05 -0400 Received: by wwi17 with SMTP id 17so55398wwi.1 for ; Sun, 11 Jul 2010 06:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=GKXjOqKrR4awA+Cds1BTs+o0oPmStqheN0HpQ6Bqz1s=; b=pvrhKzl90Q4R0ZDnu1rWSweDDEW6+EerdJPyNUP+lEMT2Y2HOyF1+5hdj1vgM/r/I+ 3EaeaN+FMF4t2UCIJSq1Dx+C0etTmoSF/8CpYZfYt726ixwGGRk5HHZOYvBHZ9B8RPxS qJ8/PTMl5a3MlhaUAERPq+if6AYRfjwDmypwM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=YpxvtZBnyy+yvPrAKJ1DNBEnYyhKTOmtBelzL7/gCO5bHOxF8LEO0WD6lvnGxEBXuM IGWIftaqqLEhFGwgs9XQhuhfvmL778xxZnPFZY16Y75cjfbXF8r2BGE6m6tKOPBnEJw7 gfLe9QvK7+5xBMwCTKlfdZtuBSCxEcD3OP/kc= Received: by 10.227.155.203 with SMTP id t11mr2841771wbw.141.1278854221669; Sun, 11 Jul 2010 06:17:01 -0700 (PDT) Received: from localhost.localdomain (5acc3a9a.bb.sky.com [90.204.58.154]) by mx.google.com with ESMTPS id a27sm22521966wbe.12.2010.07.11.06.17.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 11 Jul 2010 06:17:00 -0700 (PDT) X-Mailer: git-send-email 1.7.1.703.g42c01 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: This series notes, then fixes, a regression introduced by 15b4f7a68d8c3c8ee28424415b203f61202d65d1 / merge-tree: use ll_merge() not xdl_merge() I don't know the proper terminology to describe what's being fixed here. This seems to most-easily be triggered by (for example): git merge-tree $(git merge-base HEAD @{u}) HEAD @{u} In the git repository at the moment, this could be triggered with: git merge-tree $(git merge-base origin/next origin/master) \ origin/next origin/master Though as I write this, next has only just been merged with master, so that is not the case. For an example which is less likely to go away, try: git merge-tree c9eaaab4165d8f402930d12899ec097495b599e6 \ be16ac8cc8ce693c6adf37b80db65d10a41b4eb9 \ 9918285fb10d81af9021dae99c5f4de88ded497c It's actually very trivial to reproduce this, to the point where I can't help but wonder how much merge-tree is actually being used. As I narrowed the test-case more and more, I was surprised by how little it took to trigger it. The first patch in this series includes some very basic tests for merge-tree, the last of which demonstrates the regression. The second patch implements the trivial fix for it. This is the second version of the patch. The first version of the patch included very trivial tests for merge-tree, which were really only intended to demonstrate the breakage being fixed. This version of the patch includes proper tests, with real "expected vs actual" testing, rather than dumb "did it return successfully?" checks. Will Palmer (2): add basic tests for merge-tree fix merge-tree where two branches share no changes builtin/merge-tree.c | 3 +- t/t4300-merge-tree.sh | 277 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 279 insertions(+), 1 deletions(-) create mode 100755 t/t4300-merge-tree.sh -- 1.7.1.703.g42c01