From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master bdda935 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs Date: Mon, 17 Aug 2020 16:31:52 -0400 Message-ID: References: <20200816182558.16607.52991@vcs0.savannah.gnu.org> <20200816182601.16F2A209AC@vcs0.savannah.gnu.org> <87imdisam3.fsf@gnus.org> <87d03ptg3c.fsf@igel.home> <871rk5t4vn.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15000"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Robert Pluim , Lars Ingebrigtsen , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 17 22:32:30 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7lny-0003nM-Ng for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Aug 2020 22:32:30 +0200 Original-Received: from localhost ([::1]:40024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7lnx-0002rY-Lx for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Aug 2020 16:32:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7lnT-0002R0-Ne for emacs-devel@gnu.org; Mon, 17 Aug 2020 16:31:59 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7lnR-00016Y-Ez for emacs-devel@gnu.org; Mon, 17 Aug 2020 16:31:59 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2028344123D; Mon, 17 Aug 2020 16:31:56 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A3FF444122C; Mon, 17 Aug 2020 16:31:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1597696314; bh=oddG1/wonWJD2NSwu75Iq+AogJkGsuJCT+fKiz1H5dM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=S8clQLycaKrnypcwxxEHDBbuyTMOKLxVfj6pNRYC6ZUlIy8X+GS4BNrpGbvALILZg jlX9ox0QUg74mKLKtyWg7HpSu2nCqs0hYfUvH4AM52lrgkNfNoy18zAoE2SKUEZ7g1 vJhI/Zd70/ILeYUGThPFFQBIyOXVef4hEx+IJoxS8nIZ/yYxirGAWRN6Bof+mt6a2K xlFmHgeErX03Wxp1SiN0tJrSX3Fw1kWizEkTvZn4I2wsxIhSJ50Z4oe82JbnGGbfHT hvaqB62GFX/B/5o0ietOtOnwDOd69CpHUjTB+DbU56Lhe0za/c3aFlmV0XpKkOk9oY odwRXz2laCB+w== Original-Received: from alfajor (unknown [45.72.246.108]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 337D812029D; Mon, 17 Aug 2020 16:31:54 -0400 (EDT) In-Reply-To: <871rk5t4vn.fsf@igel.home> (Andreas Schwab's message of "Mon, 17 Aug 2020 22:05:32 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/17 15:54:34 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:253914 Archived-At: >>>> Doesn't Git offer some way to *merge* (not rebase) but with the branches swapped? >>> A merge always uses HEAD as the first parent, so if you want to swap, >>> swap HEAD. >> How can I do that in a way that as seamless as `git merge`? > You just need to make sure HEAD points to the commit you want as the > first parent. No, I want the following: - I'm in a Git worktree with HEAD pointing at some local change of mine. - I do `git ..magical..merge..` - Now I'm in a worktree where HEAD was merged with the upstream branch and the upstream branch (rather than HEAD) is the first branch. Technically within Git it's a small matter of the order in which the parents are listed in the commit. The question is how to get Git to do it using the available command line API. I know several ways to do that, but none of them are as seamless as `git merge` w.r.t things like execution time, treatment of non-committed changes, or the set of files whose mtime is affected. Stefan