From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1392C3A7F55 for ; Fri, 10 Apr 2026 21:01:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775854880; cv=none; b=hDBh2e92Nk/Iv1TBiPsJQy2TYCDzgt4qV2FXVD+AVRWzOuvA8UaIvOHQtZbHElmZyxaCuYipVWZylc9BKyyy/tq4OsH4B9/DJ5MjR++HEfrsTxYm9kumgzsCrkN8SVohcP6CDrFU8mEXqrMDRYIMwsBFmD4evfImDsCPUn5gMUI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775854880; c=relaxed/simple; bh=mRKiB1jsALOv2+RxNzDxPmpJqIFfSiWTni/fVNSt5Jc=; h=Message-Id:In-Reply-To:References:From:Date:Subject:Content-Type: MIME-Version:To:Cc; b=vA2EYPbNpLU+e+uq2sdYpSYRWbNPqNWeNt/ML81BpR+ImWikghqi5zRM8Wx7u0658lUkQdPac3O++ZCbYhVlyfDOKEw017vztqLVjgVNt6oN89B0M7W1+3XI3E0PYj9yl2xvLwUCN0bLVUgYPSN1wrCCG4AC3hrrj0l6Je3HZ7I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B8yCLI6Q; arc=none smtp.client-ip=209.85.219.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B8yCLI6Q" Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-89e8e352dc1so13449186d6.1 for ; Fri, 10 Apr 2026 14:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775854876; x=1776459676; darn=vger.kernel.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=dw48wc1EqSKxdleiljnG0SmFnbzTTv/xWO9yyNTS9Ug=; b=B8yCLI6QgkHeW9yc7Qq2rgIMN7yUskxhq8PVNnDAU9jxon/lDqDG5NedRDIeMfy5pB r8iOrGD3eK9uxQ4YQ7Flcny5ihEF8NQzCLsrUHQ010vq94NzhAAA71C/+G0TH4Ai2fGr DxbwTCKWzXMcDXeOwuiCtcF3CrO8EWGplBZsZeAEuJrCRlZ2I5zGo0u9KLYRbLpkENRV dRPKUHt4s10cppHrvx0o6P4kJvG4ja/H5mgkzTkxdtF27ukAOWrLgK+LLYOTmiW4cPlO 8heyoDHAKZSv7relIzjf7wB+F+GN//1w0cfnmbNSJw7a5dC+EWnyHlbAfwwhjeMk5//G 0jWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775854876; x=1776459676; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dw48wc1EqSKxdleiljnG0SmFnbzTTv/xWO9yyNTS9Ug=; b=XBTF0JLuaCh7J5ljXAtiIkh3uIedtSR3Qttbh9yezU8xe7rEC2UJhE4CrxGfLL9BzJ 5HWUpMNYV4wTUDvxGtugFTqXD9E6KL62yEc4xu/eJZTyeAMucjs396JnwpnXycay150n IFPNqOhXPZ5yrfe9n2O11ox1S0SAqb0fk/0/JpFl5KbRbJqKCeqd7n5r1wxyLTEFPUrG a6pTiq6wt+bvPncEJrTn9RjLE/DP/eH87P9b/wS4lFInq4+JkHxQG+U7ZN4aHebCUo8a EMZIJU6nRchkDiu+d3NLtsqmUUh1wQPnVcjsFgOcY6nyyKRgJSK9ldWV4xqE21yBMWJa Cqiw== X-Gm-Message-State: AOJu0YxfPKmwWcrkeS9OrNWvXFdMPDkXPdudw28MC6a1+9i9ypiWPFkH tzIDnAQSysrrJFEhs6IafDPhpK/6cCH9nqOCzjqxs4PYJjmpRZjHk076bkgLmA== X-Gm-Gg: AeBDiesgDOjraFj1dYQ2zgbSpl+bSOFhTgs3mBWC7xHVXhYzPNT3f4/XHMe6oX0eryR EWoJ6pj3bjhRGur7OMDLOs//8zHZGPQDeAnk6+5KDJtr13xVqOFAWhSnPvd7OVxoOAEOVfhYHAk zgsEJi0vgHfQlBt/1y6DI1xJaOGMs6oKMbiOYNE+wWC8VGpJwpX+k8Ku/TLYUdGxqYm6so7kxk+ E2GC+mV8GTMJPGZ2FqWf0JvBN+RXQAsfJ5WajbZiaTrspr8Lm4amub4ZMn7ibsEU3hti/ziUzj1 UiJB3GQCw+C+5gTHaG4E5481MxXnjXjxLBvoUojM5T5VopSqd5jGEarT8eKSHD0koR7G6vxN0Qd rDyqbcK5Oh584ijnYteoDfhONdMjOp2+vzzte7NKVGAXgNcQe1y5V3+jOk1/1pN/uXM2OqnegES WmARSrSfhMyXMpVK9/uCtJQ2sxLw== X-Received: by 2002:a0c:e017:0:b0:89c:4d3e:fa41 with SMTP id 6a1803df08f44-8ac860e881bmr61348036d6.12.1775854875915; Fri, 10 Apr 2026 14:01:15 -0700 (PDT) Received: from [127.0.0.1] ([52.150.30.136]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ac84a37f1csm32486396d6.18.2026.04.10.14.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2026 14:01:14 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Harald Nordgren via GitGitGadget" Date: Fri, 10 Apr 2026 21:01:09 +0000 Subject: [PATCH v9 0/4] checkout: 'autostash' for branch switching Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 To: git@vger.kernel.org Cc: Phillip Wood , Chris Torek , Harald Nordgren Harald Nordgren (4): stash: add --label-ours, --label-theirs, --label-base for apply sequencer: allow create_autostash to run silently sequencer: teach autostash apply to take optional conflict marker labels checkout: -m (--merge) uses autostash when switching branches Documentation/git-checkout.adoc | 58 +++++----- Documentation/git-stash.adoc | 11 +- Documentation/git-switch.adoc | 33 +++--- builtin/checkout.c | 138 ++++++++++------------ builtin/stash.c | 32 ++++-- sequencer.c | 67 ++++++++--- sequencer.h | 4 + t/t3420-rebase-autostash.sh | 24 +++- t/t3903-stash.sh | 29 +++++ t/t7201-co.sh | 195 ++++++++++++++++++++++++++++++++ t/t7600-merge.sh | 2 +- xdiff-interface.c | 12 ++ xdiff-interface.h | 1 + xdiff/xmerge.c | 6 +- 14 files changed, 455 insertions(+), 157 deletions(-) base-commit: cd412a49627774a14b3e49237109a77bd3ea70c0 Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2234%2FHaraldNordgren%2Fcheckout_autostash-v9 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2234/HaraldNordgren/checkout_autostash-v9 Pull-Request: https://github.com/git/git/pull/2234 Range-diff vs v8: 1: 8fcf377820 ! 1: 5d5dc1f60e stash: add --ours-label, --theirs-label, --base-label for apply @@ Metadata Author: Harald Nordgren ## Commit message ## - stash: add --ours-label, --theirs-label, --base-label for apply + stash: add --label-ours, --label-theirs, --label-base for apply Allow callers of "git stash apply" to pass custom labels for conflict markers instead of the default "Updated upstream" and "Stashed changes". @@ Documentation/git-stash.adoc: git stash list [] git stash drop [-q | --quiet] [] git stash pop [--index] [-q | --quiet] [] -git stash apply [--index] [-q | --quiet] [] -+git stash apply [--index] [-q | --quiet] [--ours-label=