From patchwork Wed Dec 4 07:47:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11272215 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56C8F17EF for ; Wed, 4 Dec 2019 07:48:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 334A620637 for ; Wed, 4 Dec 2019 07:48:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eLzouHg7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726679AbfLDHrz (ORCPT ); Wed, 4 Dec 2019 02:47:55 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42365 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726048AbfLDHry (ORCPT ); Wed, 4 Dec 2019 02:47:54 -0500 Received: by mail-pl1-f196.google.com with SMTP id x13so2803582plr.9 for ; Tue, 03 Dec 2019 23:47:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LZjBfy1fxChr+CvrWi2FuH41XlOVip8CW43YiSem9cM=; b=eLzouHg7AM4l7N7NrNaszYeCKYMpStSUIior6NCtj/1L285C7ghsJh+5mo2eYg9YSi YT28keLnDEi/3EoS0XZSLXkjCWJfP0Lg0TA0GfVCGeyL8OJiMCc7WUALUa7a/XuDHAEA EByDMPYBbsZ/DIlQHSvkUn5nG012DJ3zEFS1RtU3zqIrxXj3+IaxPYdtTeNcRCmc7PlH LxLOYs75OgeT+VhLp5V4aPGH7AFit4YxnHPBvz0f7MMtuYsfPSfsFgfSxqy0/7qpVQ/o sxGXH4v9vQ75WXQ4jhZ6gobhi7Zaq11GytOgk0r0yPcMkJlaf9h91P4WCvVgsQ7DCRqo x1vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LZjBfy1fxChr+CvrWi2FuH41XlOVip8CW43YiSem9cM=; b=k2MFezvmca71+0clnSUVafYss0jSbKjuLbCwZjG5KLWO0q6kLkhgBi6P+7YvfxyCJP K9EhvhGN95ocqGlvA3QRSbuoHI25V2zZwRcOPD8xhpDxHxMf/EfDVpQV8jloPBKTHkDQ CHrHSAX4m/ZS5IEjcDylqo4AHibkKdPHtgRcH/uI5DCm1u2x0ooCUcSEc2j6OtbP0TgC mfimNbZG6NpIHAYP+sjG5MWevl1M+W1wJvgFkg14NxN5FPfdakKdIz8rtpTGAGQqKgq2 GYyGBPpGcOmlszGo4DVe2GSWftjcfQ/QtJC0QoB3SD+fMdevvKg0Xd3c1nM3+5zepKXQ lU6Q== X-Gm-Message-State: APjAAAXZCgYYRIaVVfxonIcvUogW0DKyOKnArTkMwFiTqVSS+GxMHMZY jJ6DkYUavqszKSkPkfXjc1OBiTN1 X-Google-Smtp-Source: APXvYqxCRwOXujwJzYB9kTtpx2rkVJdLBsCuTdfXPocZ6aJi/T/3viOaqWp+qw3aB7T8vz8krc14ag== X-Received: by 2002:a17:902:b691:: with SMTP id c17mr2007737pls.252.1575445673533; Tue, 03 Dec 2019 23:47:53 -0800 (PST) Received: from generichostname ([2601:646:280:1b30:b0bc:639f:d5c8:2bcf]) by smtp.gmail.com with ESMTPSA id 186sm6667713pfe.141.2019.12.03.23.47.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2019 23:47:53 -0800 (PST) Date: Tue, 3 Dec 2019 23:47:51 -0800 From: Denton Liu To: Git Mailing List Cc: Christian Biesinger , Eric Sunshine , Junio C Hamano Subject: [PATCH v3 1/5] t3400: demonstrate failure with format.useAutoBase Message-ID: <8d67bbe5bfb7b09dff9687a06acb92fbf8202699.1575445583.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Ever since bb52995f3e (format-patch: introduce format.useAutoBase configuration, 2016-04-26), `git rebase` has been broken when `format.useAutoBase = true`. It fails when rebasing a branch that doesn't have an upstream set: fatal: failed to get upstream, if you want to record base commit automatically, please use git branch --set-upstream-to to track a remote branch. Or you could specify base commit by --base= manually error: git encountered an error while preparing the patches to replay these revisions: ede2467cdedc63784887b587a61c36b7850ebfac..d8f581194799ae29bf5fa72a98cbae98a1198b12 As a result, git cannot rebase them. Demonstrate that failure here. Reported-by: Christian Biesinger Signed-off-by: Denton Liu --- t/t3400-rebase.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index ab18ac5f28..ca99e8c6c4 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -159,6 +159,12 @@ test_expect_success 'fail when upstream arg is missing and not configured' ' test_must_fail git rebase ' +test_expect_failure 'rebase works with format.useAutoBase' ' + test_config format.useAutoBase true && + git checkout topic && + git rebase master +' + test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg' ' git checkout -b default-base master && git checkout -b default topic &&