From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 720E41F9E0 for ; Mon, 27 Apr 2020 17:59:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgD0R7x (ORCPT ); Mon, 27 Apr 2020 13:59:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726269AbgD0R7x (ORCPT ); Mon, 27 Apr 2020 13:59:53 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41575C0610D5 for ; Mon, 27 Apr 2020 10:59:53 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id g12so638908wmh.3 for ; Mon, 27 Apr 2020 10:59:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=R1jNqJ078yqepFQXNLKs1Oc8ApSsvXqmzUQJ/zkTY6k=; b=uACWU3AdZZH+yENNc7H4qE4V//wFT8Uh4aiBnznm4uiD06WmBoT+8NoGUU5VgBxByY 4mt/V9tfz3u6bt0xK/d9hwjPhweuMl+zyLPT8449aMCOl6lwN7Jkt/A9Y5wOPxla61fy DHJMay1oRzRe/VjGqdoovhTPjj3S4BUONxlbGc/Omr4QXhTf5kmmqrfABJpAyVPg9t/P ZxK3xWcZXJoLn/UIqyItdoBb8ETX2jCSjIwuqAPk3uoqounJwOU/WnYXoSkVmRatFw/4 CvEawXol8Zt+bWmANGubR/29GSanOOwHA6gtAYyaLPYjXqSLaxsCLLNAOABe+/WZFFRj NwKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=R1jNqJ078yqepFQXNLKs1Oc8ApSsvXqmzUQJ/zkTY6k=; b=SjdHPNK8Iiwbiw/0ap9Q0zGOvk8ofQCHdF2Mgg1EJnnt9D1luWtkxCRNt8+/0ttY0h kCH3dXH5V1bOAObepLVNYuwVbH7jU4DIfU3vqrUcaNcaF6VUD0FLLtOhxu9Hk3RJkWX9 lp0RcmerHryKGCSeVydv3Pc771pEZv+kSxEfR0vKUlsIHm0sfMM8/HtNXPN9YksH5RW/ 1pJ5XXKEXqDViXwINFsBa8F0x06SbTM7z+vzKueqkFeyPhnWkd9XCodm+UDwNS08naK9 bAWZUeGAS6+iFMrvxZtIW7PPDAljlxybUvIqpWyzlGIQ4WaEPHJNb9T6bBpd+BvAPwI/ 57cQ== X-Gm-Message-State: AGi0PuZF898+P7X6MZml+ThZ+dZqahkA6Vri31S97D/Wyj2WGQCONPnV CPgGNziukd1swjD3a0oUn+tJJBXC X-Google-Smtp-Source: APiQypL3qg3vP+8H/R1u4h3sKTnzh5rKzBzMaZzmbvHe24GiAcs1zy/jVqnvSgDnPzALCT06hN0i3A== X-Received: by 2002:a1c:e087:: with SMTP id x129mr694370wmg.127.1588010391787; Mon, 27 Apr 2020 10:59:51 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id x18sm21626539wrv.12.2020.04.27.10.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 10:59:51 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 27 Apr 2020 17:59:49 +0000 Subject: [PATCH v2] rebase: display an error if --root and --fork-point are both provided Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 To: git@vger.kernel.org Cc: alexander.berg@atos.net, Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren --root implies we want to rebase all commits since the beginning of history. --fork-point means we want to use the reflog of the specified upstream to find the best common ancestor between and and only rebase commits since that common ancestor. These options are clearly contradictory, so throw an error (instead of segfaulting on a NULL pointer) if both are specified. Reported-by: Alexander Berg Documentation-by: Alban Gruin Signed-off-by: Elijah Newren --- rebase: display an error if --root and --fork-point are both provided Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-771%2Fnewren%2Frebase-fork-point-root-error-v2 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-771/newren/rebase-fork-point-root-error-v2 Pull-Request: https://github.com/git/git/pull/771 Range-diff vs v1: 1: c4508c7ddae ! 1: 307124b00d4 rebase: display an error if --root and --fork-point are both provided @@ Commit message segfaulting on a NULL pointer) if both are specified. Reported-by: Alexander Berg + Documentation-by: Alban Gruin Signed-off-by: Elijah Newren + ## Documentation/git-rebase.txt ## +@@ Documentation/git-rebase.txt: When --fork-point is active, 'fork_point' will be used instead of + ` command (see linkgit:git-merge-base[1]). If 'fork_point' + ends up being empty, the will be used as a fallback. + + +-If either or --root is given on the command line, then the +-default is `--no-fork-point`, otherwise the default is `--fork-point`. ++If is given on the command line, then the default is ++`--no-fork-point`, otherwise the default is `--fork-point`. + + + If your branch was based on but was rewound and + your branch contains commits which were dropped, this option can be used + with `--keep-base` in order to drop those commits from your branch. +++ ++See also INCOMPATIBLE OPTIONS below. + + --ignore-whitespace:: + --whitespace=