From patchwork Mon Oct 7 11:10:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kristoffer Haugsbakk X-Patchwork-Id: 13824477 Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15B341D1E64 for ; Mon, 7 Oct 2024 11:11:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728299484; cv=none; b=rKPUsCFL/aFmc/HuYkcet94qvpy/NQkkncHth6iSNwB+kInYdTsWJEknIV/9+hz1bwk1W13rucPbenkwNppWHEvLyV35U8MeDixz4SKhn2Kj+RqKP2JR2BQvwtKri5wEaDb3YbJ4tVF8djs0L1feEINy32QOT8suXQ/Wc7Ht5Yc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728299484; c=relaxed/simple; bh=z7T7xoWXq2M4qSiCE51WasDvfIciUzjY427JmmJx1bA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Gtavw9HGNwIjrx6vsF0HhItGnslTIJRgKLNsRuyVYvdPsntwTsmM6HrQ9li/H+trlFQCwnr8CDV+2UFsI/U8PjGe7buFnHsZH6hYrCedkm9syw6DruHkct6X8HKv9e/aKfKuwBZ+SkEQ/2yUcwCm2xxIX9QDzzvdNT35rJ3Cgk0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name; spf=pass smtp.mailfrom=khaugsbakk.name; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b=QgfqgVnr; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=b1y3FPzU; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b="QgfqgVnr"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="b1y3FPzU" Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3CD2011401C1; Mon, 7 Oct 2024 07:11:22 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Mon, 07 Oct 2024 07:11:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khaugsbakk.name; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1728299482; x=1728385882; bh=OJ/3R6yOzI9gSJOQV/NlBPq4TFV37j2e fSjD5hJhgc8=; b=QgfqgVnr3aczsYHny9TnDIWK/PVX+/R9bsSOBVathr37czGw sc1Kjvf9O1/05nyawpT7+BRdbbJRcVtPLLuuCEXWhIxK6wOS4l7ZPSHWHZAVlMF/ KOt35HwOy30kSgn+PIz+hWIkS+xY/14RjJxp2OotKZVAyIt4sbGb0G2Uukud60Hf NfaKuFkft7Z47t+fvFSCwthTT/I64H2m2Cf26Tt8eDbptpUEksRQH5e3yWPpCXQX hC/yP+fljM4leGTcfw8zQhaQbPR+WgLOdp/R/3sKz5BqUrGl8JsUITGXAEKdPx6t hd4sDTx01mWi8M7eGlxJXiH6F7bYZ+8/XOSBJA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728299482; x= 1728385882; bh=OJ/3R6yOzI9gSJOQV/NlBPq4TFV37j2efSjD5hJhgc8=; b=b 1y3FPzUQSnmhXab1PAV9aaO5+0TEBJqIahSmKCClEY9BZiFLMcUsTAn2ZXsnqzH3 5gSxxpyWJR8KIKglIs4/UoTkS3dX2IANCb3roHX4ChE4ELNnCEAWdhkvoPk3NxPS yIZDprL4HnLk0Y8JT1hmvHqcyME4RZMigx8+0z7ElhhRJI0DW2a8tFPgtMUraz5q aDUA6cRIEsALs8Uwt6DpOLMPV0wPj7Nt8IN3sR6fOvKmAtNiwQmUCILDtyr3AgXd oG5Q+UsroOR73a0jKTF/fX0vtNSCnwhlfKnybmXXgYyWDx6D0JlwdvvyLjpXjjjJ pRb5EVkctSRACWd1ikaqw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvledgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevuf ffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepmfhrihhsthhofhhfvghrucfj rghughhssggrkhhkuceotghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvqeenucggtf frrghtthgvrhhnpeevgfelveeikeegjeeikeeuvefhleeiuddvleegfeekjedtkeevtdet gfffveettdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegtohguvgeskhhhrghughhssggrkhhkrdhnrghmvgdpnhgspghrtghpthhtohepgedp mhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlh drohhrghdprhgtphhtthhopehkrhhishhtohhffhgvrhhhrghughhssggrkhhksehfrghs thhmrghilhdrtghomhdprhgtphhtthhopehnvgifrhgvnhesghhmrghilhdrtghomhdprh gtphhtthhopegtohguvgeskhhhrghughhssggrkhhkrdhnrghmvg X-ME-Proxy: Feedback-ID: i2671468f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Oct 2024 07:11:21 -0400 (EDT) From: Kristoffer Haugsbakk To: git@vger.kernel.org Cc: Kristoffer Haugsbakk , newren@gmail.com, Kristoffer Haugsbakk Subject: [PATCH 1/3] doc: merge-tree: provide a commit message Date: Mon, 7 Oct 2024 13:10:27 +0200 Message-ID: X-Mailer: git-send-email 2.46.1.641.g54e7913fcb6 In-Reply-To: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Commit-Hash: fef203471f4492af1468a0c91088324c394effd5 From: Kristoffer Haugsbakk From: Kristoffer Haugsbakk Provide a commit message in the example command. The command will hang since it is waiting for a commit message on stdin. Which is usable but not straightforward enough since this is example code. Signed-off-by: Kristoffer Haugsbakk --- Notes (series): Unlike on some other manuals you probably won’t end up running these commands directly to test things out. But you might end up copying and modifying it when playing around with the command. Documentation/git-merge-tree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt index 84cb2edf6d0..590cbf5df79 100644 --- a/Documentation/git-merge-tree.txt +++ b/Documentation/git-merge-tree.txt @@ -213,7 +213,7 @@ used as a part of a series of steps such as: NEWTREE=$(git merge-tree --write-tree $BRANCH1 $BRANCH2) test $? -eq 0 || die "There were conflicts..." - NEWCOMMIT=$(git commit-tree $NEWTREE -p $BRANCH1 -p $BRANCH2) + NEWCOMMIT=$(git commit-tree $NEWTREE -mMerge -p $BRANCH1 -p $BRANCH2) git update-ref $BRANCH1 $NEWCOMMIT Note that when the exit status is non-zero, `NEWTREE` in this sequence From patchwork Mon Oct 7 11:10:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristoffer Haugsbakk X-Patchwork-Id: 13824478 Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 219742AD05 for ; Mon, 7 Oct 2024 11:11:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.146 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728299498; cv=none; b=hRYnDXvlQl614JJ8hZaeFgRQFGiiN2JFT2DaqIbOKDEK6z92eUDcTmvp5YlF9IHTDMnwf8fRVTe1SibDJLQQDQpeACxfXoUEufnhmecj7RnDJlUthuEhoKEL6OwehLmriJ8Su4Nx78f2H1937586ZfNe3lcIlrZDEbffS45j9Cs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728299498; c=relaxed/simple; bh=zA2c9XbqCUarERE8f2Y57yHFn1sbGkWWMJtf4yZ3vQQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ItroZrxq4hnSSMu1dlaIff6HFAorx7HLjtK46dQVcuqaXbIuDF4bguzoa3ACfxSSWBUh1e/AiVR1qcH20BzmYQBennVYMSYEhx8n01pfHgdHEF9kNv7bnQtPGvte/+BRbdyliLP59YObI2N14QMG4D1k92F5R2I918DmJWPW4Yk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name; spf=pass smtp.mailfrom=khaugsbakk.name; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b=ckAUZpsb; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GsXqjlDW; arc=none smtp.client-ip=103.168.172.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b="ckAUZpsb"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GsXqjlDW" Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id 34A4713801AF; Mon, 7 Oct 2024 07:11:36 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Mon, 07 Oct 2024 07:11:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khaugsbakk.name; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1728299496; x= 1728385896; bh=GF0Y0+9sGh+GTDrU4gptw3pAD8/190CmkxAAphtZp7k=; b=c kAUZpsb2LMX/mg2j0kpoOcUbjgVXfSUGgVXyg5maHgUT46MYdT53G5N/7oBWYLdH wfNauquI3m0S5zYi9qyQoX5N8l2yqhh2rdj//aX/kzf6OQs95OASNj82hJ+ORdm0 kqQ1XVlvRpSs81Ezxex2//2cBQaWkMOiQ8i2SiIzhPz2FRsNWsKrvUaqW8ACSS1R DLiPE08KRxhtyhow6gMmMcZq0R67/O6zXafMD0hlipMeGl2DwQnrSE7zSJf6ys3x 6we/HQ3LmCRMFbGi4Pl6dt/zCjF8lgfHNjHV5fi+YM7b2XeLfj4gwn+nQSXWu5o0 KuzJ/WVBho9qZPB7/ftVw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728299496; x= 1728385896; bh=GF0Y0+9sGh+GTDrU4gptw3pAD8/190CmkxAAphtZp7k=; b=G sXqjlDWtRYREFLEqwT+RH5e4kZEV82hU7pKn++Q0PSGlrU+JNeSLS4lwlkdoLlDx dywmeRTgpdHJzH2SxI+5iMMDjxyZC+3DxQicBd/9jpmO+hCt7iW85uYIi+ENDb+h jofULBo7iMXuLBMCVXwF2q94YlmpwNYPohpFNgrJLKgWKTm1FmTt4K5mciz9eUDl iABWxZUOeWNnJF2L7zlKjKROmJXOt6rHuI5z9JiFxc+vCN5Sfp/RGBpTIAqCgOwF Wx8U13iBvUQym/LlyGd8L/Sya/R9BhKCDncoT25rP74VQZ/bZGP6lc4kOr01txNC be3LPERelO3ykpBKL3fUA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvledgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevuf ffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmrhhishhtohhffhgvrhcujfgr uhhgshgsrghkkhcuoegtohguvgeskhhhrghughhssggrkhhkrdhnrghmvgeqnecuggftrf grthhtvghrnhepteduieehgedutdfgudevkefhveduieeiteejhfffteeitdegjeeihedt hfejgfetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eptghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvpdhnsggprhgtphhtthhopeegpdhm ohguvgepshhmthhpohhuthdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrd horhhgpdhrtghpthhtohepkhhrihhsthhofhhfvghrhhgruhhgshgsrghkkhesfhgrshht mhgrihhlrdgtohhmpdhrtghpthhtohepnhgvfihrvghnsehgmhgrihhlrdgtohhmpdhrtg hpthhtoheptghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i2671468f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Oct 2024 07:11:34 -0400 (EDT) From: Kristoffer Haugsbakk To: git@vger.kernel.org Cc: Kristoffer Haugsbakk , newren@gmail.com, Kristoffer Haugsbakk Subject: [PATCH 2/3] doc: merge-tree: use lower-case variables Date: Mon, 7 Oct 2024 13:10:28 +0200 Message-ID: <97f16cb68e059792ddc7d1897ab6e93d536fe19c.1728298931.git.code@khaugsbakk.name> X-Mailer: git-send-email 2.46.1.641.g54e7913fcb6 In-Reply-To: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Commit-Hash: 97f16cb68e059792ddc7d1897ab6e93d536fe19c From: Kristoffer Haugsbakk From: Kristoffer Haugsbakk This is easier to read. Signed-off-by: Kristoffer Haugsbakk --- Documentation/git-merge-tree.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt index 590cbf5df79..10f8ac7f80a 100644 --- a/Documentation/git-merge-tree.txt +++ b/Documentation/git-merge-tree.txt @@ -211,12 +211,12 @@ linkgit:git-commit-tree[1], linkgit:git-write-tree[1], linkgit:git-update-ref[1], and linkgit:git-mktag[1]. Thus, it can be used as a part of a series of steps such as: - NEWTREE=$(git merge-tree --write-tree $BRANCH1 $BRANCH2) + newtree=$(git merge-tree --write-tree $branch1 $branch2) test $? -eq 0 || die "There were conflicts..." - NEWCOMMIT=$(git commit-tree $NEWTREE -mMerge -p $BRANCH1 -p $BRANCH2) - git update-ref $BRANCH1 $NEWCOMMIT + newcommit=$(git commit-tree $newtree -mMerge -p $branch1 -p $branch2) + git update-ref $branch1 $newcommit -Note that when the exit status is non-zero, `NEWTREE` in this sequence +Note that when the exit status is non-zero, `newtree` in this sequence will contain a lot more output than just a tree. For conflicts, the output includes the same information that you'd get From patchwork Mon Oct 7 11:10:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristoffer Haugsbakk X-Patchwork-Id: 13824479 Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E816C18BB91 for ; Mon, 7 Oct 2024 11:11:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728299507; cv=none; b=b271XPJB06DSp2O293eM+/YwNsqZ8P0/Cm9RUtnHZ4hZCwcA6J03CSc2Bgl6A2FbhzqcoMeREpKIlCPutucUpj/xiGfGZue3LAftPQ17LYQz8H4MzmR8kE0EhIblxXNz0x+NeHZKGn6G+Q/000jmCMn2mavF7Pr9NiPr22aIS3M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728299507; c=relaxed/simple; bh=fs3qLKFJtfK3dqSvDK9HC0nYSnMEBWM8rXAaLy0Vyqw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UX3+LPWyweeP8+FYjFvBd7aVmoi+IRPbhDlQjS6L/CUrV7f9AOq/dgxsAPhhBax+YVphwPK4lmNOg2vl72gV4TWwpqp4hivjPvkMbBh6nUXomt2Ur5jaTIkl6K3TJmJwGIXPgwBUlUlxkvKSfmWZZDp7bc/6rTReNy1cmKwM0HM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name; spf=pass smtp.mailfrom=khaugsbakk.name; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b=SSFZqt/O; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=k7Rb1WK6; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b="SSFZqt/O"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="k7Rb1WK6" Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id F2D0C11401C8; Mon, 7 Oct 2024 07:11:44 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Mon, 07 Oct 2024 07:11:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khaugsbakk.name; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1728299504; x= 1728385904; bh=NLwq5FczTksTqRNwXW5tFifv2GYcK5mpxf84BQ0RJaw=; b=S SFZqt/OjPFI45iuziqysEyepg9nwvp+9xZTMQFngrWuQ0bYxZXxjFVgGRnlRptb6 C5JVmSRWNlfK71mVj3ol8rPxeAXg1khL4PqjkiUiY+J/0ywvXCuJoLVNnv0oBRqD C3BNCuc6IHY8F86osMqzhyLrlVA5oF/+xvmbCCGbx9I/CuzPJDhkWKnxHrfnz7FF 41IpSpw3GHK75UpksneHsepTfLyo6CoI2WRlZNWOTCbnCx0leJ5Ib7c8KmkcnkYF 8Ybaei04m5tA5UCiZvYxcz4tMjkWCewFzdvBmNi0k0rDEtNnkm7NcrXENZAsmff3 CdtoYr7xWUai/MazixF2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728299504; x= 1728385904; bh=NLwq5FczTksTqRNwXW5tFifv2GYcK5mpxf84BQ0RJaw=; b=k 7Rb1WK6HYW/mJZvzUuSFSr6pMae25pXDtoh77Ln83HqXfHS72TLIA43ZICwjAB1U hn2LOy5YUwIIKjqHOc1Mijh/3oTk35fjnRm6G2Bhb7eXmxf8W6ELvjGJCx9OnyPG PMUwiTH3JRGmpMh7BpRSfJ/WnMrUQiQ6aM406DAxKF28hC2ysFhvMFaP1XtgvEGR HNG7fPZDpMapaatrKVMhT3n5PguJZYtd4h1g8Fonm/57xZL1Xy6GgBXVIT2QjgfT zWCZv32YEo4gxJwv5mvoXMu79AlKi7CdT6P9GvNBRV/hWYa0XnyEhFzxxG+uXpAX ZnrT+ajHgb+4s59cfDbpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvledgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevuf ffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmrhhishhtohhffhgvrhcujfgr uhhgshgsrghkkhcuoegtohguvgeskhhhrghughhssggrkhhkrdhnrghmvgeqnecuggftrf grthhtvghrnhepteduieehgedutdfgudevkefhveduieeiteejhfffteeitdegjeeihedt hfejgfetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eptghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvpdhnsggprhgtphhtthhopeegpdhm ohguvgepshhmthhpohhuthdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrd horhhgpdhrtghpthhtohepkhhrihhsthhofhhfvghrhhgruhhgshgsrghkkhesfhgrshht mhgrihhlrdgtohhmpdhrtghpthhtohepnhgvfihrvghnsehgmhgrihhlrdgtohhmpdhrtg hpthhtoheptghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i2671468f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Oct 2024 07:11:43 -0400 (EDT) From: Kristoffer Haugsbakk To: git@vger.kernel.org Cc: Kristoffer Haugsbakk , newren@gmail.com, Kristoffer Haugsbakk Subject: [PATCH 3/3] doc: merge-tree: use || directly Date: Mon, 7 Oct 2024 13:10:29 +0200 Message-ID: <4057d6386125e51fd934f92abd11c62a9d24a832.1728298931.git.code@khaugsbakk.name> X-Mailer: git-send-email 2.46.1.641.g54e7913fcb6 In-Reply-To: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Commit-Hash: 4057d6386125e51fd934f92abd11c62a9d24a832 From: Kristoffer Haugsbakk From: Kristoffer Haugsbakk Use `||` directly since that is more straightforward than checking the last exit status. Also use `echo` and `exit` since `die` is not defined. Signed-off-by: Kristoffer Haugsbakk --- Documentation/git-merge-tree.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt index 10f8ac7f80a..46091da022d 100644 --- a/Documentation/git-merge-tree.txt +++ b/Documentation/git-merge-tree.txt @@ -211,8 +211,10 @@ linkgit:git-commit-tree[1], linkgit:git-write-tree[1], linkgit:git-update-ref[1], and linkgit:git-mktag[1]. Thus, it can be used as a part of a series of steps such as: - newtree=$(git merge-tree --write-tree $branch1 $branch2) - test $? -eq 0 || die "There were conflicts..." + newtree=$(git merge-tree --write-tree $branch1 $branch2) || { + echo "There were conflicts..." 1>&2 + exit 1 + } newcommit=$(git commit-tree $newtree -mMerge -p $branch1 -p $branch2) git update-ref $branch1 $newcommit