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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 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,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 5950A1F48C for ; Mon, 17 Feb 2020 17:25:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729678AbgBQRZ3 (ORCPT ); Mon, 17 Feb 2020 12:25:29 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39463 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729375AbgBQRZ1 (ORCPT ); Mon, 17 Feb 2020 12:25:27 -0500 Received: by mail-wm1-f68.google.com with SMTP id c84so113408wme.4 for ; Mon, 17 Feb 2020 09:25:26 -0800 (PST) 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=s6UKQ3UVj1/6S4yg9rFPtjA48MHEQRyxGGe85J73NIo=; b=QLCxpalrvrnjuXTrrMs0zwtJHneI0TPLA9AGwv4VdiFTk5MewjG5X59C3p1JOcb6oU BnpQdWnWsme8feG20aOOLx33CbQDE3OI+wE2JUSX9xX/+9Z8YBks9ElAb1mZEZMZdCqi QBI4UIVVZM4yTVe5t+hjmw832CeFLYAZbTW6OcybFlRp55fuNN8BlLe3st5hG6UvqGuQ Uzf/vpa3Scpu9YOVxs7jOHDFx8S7TW1Lr7cPHLbS7brfuP2Su3cfKjxDaGKXTdrpfYtf otyMqRETAkfJM5nQP+AWohnR8YJCMRbdXp4qZPZB/8FQi+tVuQ8hGBZCtZuKXGNDHLX7 WHyg== 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=s6UKQ3UVj1/6S4yg9rFPtjA48MHEQRyxGGe85J73NIo=; b=cq7DR7xVSzV9EwR34Z3Wrefdwr8by2xZN4DD02F49ADtqvmZB/1aXrgZRHAtgpd2bj 0FHRWHqv3A/Qyvtqai2nFC+GSwRA2BosNbCg8drU08sNMoE4z79hdBRIFcb02v6zHZRN W1DaBczmvNf0FuzWe1OoS6wssWVseXkRCVWa7Hf1FBFb3RZ48HKnrTpn5To+Bdpxx1HX cJPZFDEW5uiMpOUbLWCf0sT7U2HEsQO0TjXoBMeSOlxjJfZQIP5U1Vsjsf6aIwROUMp9 sgDQTIO5nDx7klOt9nlO+u10I76eihVs+0cdLGrgng+H9ccTsbqvwgMlcVnPF9qn7IpK YP3w== X-Gm-Message-State: APjAAAWE5OrVDz+UW/UWqDdxhgZFXbv39slebHLxLCQ3bQs6XY7UpVVO Wf7xYrax6lIK+i1/QhWbJUwUwTTj X-Google-Smtp-Source: APXvYqydezy4V4mEeUgIcViREkNimwXNidJjpd0FI3q4xGDzzma8MIOukkOMvydmoHZWAzux++SQlg== X-Received: by 2002:a7b:c0c4:: with SMTP id s4mr60316wmh.131.1581960325853; Mon, 17 Feb 2020 09:25:25 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id c15sm1870359wrt.1.2020.02.17.09.25.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 09:25:25 -0800 (PST) Message-Id: In-Reply-To: References: From: "Alexandr Miloslavskiy via GitGitGadget" Date: Mon, 17 Feb 2020 17:25:17 +0000 Subject: [PATCH v3 3/8] doc: stash: split options from description (1) Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 To: git@vger.kernel.org Cc: Paul-Sebastian Ungureanu , Alexandr Miloslavskiy , Alexandr Miloslavskiy Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Alexandr Miloslavskiy This patch moves blocks of text as-is to make it easier to review the next patch. Signed-off-by: Alexandr Miloslavskiy --- Documentation/git-stash.txt | 68 +++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 53e1a1205d3..2dedc219974 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -58,31 +58,6 @@ non-option arguments are not allowed to prevent a misspelled subcommand from making an unwanted stash entry. The two exceptions to this are `stash -p` which acts as alias for `stash push -p` and pathspecs, which are allowed after a double hyphen `--` for disambiguation. -+ -When pathspec is given to 'git stash push', the new stash entry records the -modified states only for the files that match the pathspec. The index -entries and working tree files are then rolled back to the state in -HEAD only for these files, too, leaving files that do not match the -pathspec intact. -+ -If the `--keep-index` option is used, all changes already added to the -index are left intact. -+ -If the `--include-untracked` option is used, all untracked files are also -stashed and then cleaned up with `git clean`, leaving the working directory -in a very clean state. If the `--all` option is used instead then the -ignored files are stashed and cleaned in addition to the untracked files. -+ -With `--patch`, you can interactively select hunks from the diff -between HEAD and the working tree to be stashed. The stash entry is -constructed such that its index state is the same as the index state -of your repository, and its worktree contains only the changes you -selected interactively. The selected changes are then rolled back -from your worktree. See the ``Interactive Mode'' section of -linkgit:git-add[1] to learn how to operate the `--patch` mode. -+ -The `--patch` option implies `--keep-index`. You can use -`--no-keep-index` to override this. save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] []:: @@ -128,14 +103,6 @@ pop [--index] [-q|--quiet] []:: Applying the state can fail with conflicts; in this case, it is not removed from the stash list. You need to resolve the conflicts by hand and call `git stash drop` manually afterwards. -+ -If the `--index` option is used, then tries to reinstate not only the working -tree's changes, but also the index's ones. However, this can fail, when you -have conflicts (which are stored in the index, where you therefore can no -longer apply the changes as they were originally). -+ -When no `` is given, `stash@{0}` is assumed, otherwise `` must -be a reference of the form `stash@{}`. apply [--index] [-q|--quiet] []:: @@ -185,6 +152,41 @@ store:: reflog. This is intended to be useful for scripts. It is probably not the command you want to use; see "push" above. +If the `--all` option is used instead then the +ignored files are stashed and cleaned in addition to the untracked files. + +If the `--include-untracked` option is used, all untracked files are also +stashed and then cleaned up with `git clean`, leaving the working directory +in a very clean state. + +If the `--index` option is used, then tries to reinstate not only the working +tree's changes, but also the index's ones. However, this can fail, when you +have conflicts (which are stored in the index, where you therefore can no +longer apply the changes as they were originally). + +If the `--keep-index` option is used, all changes already added to the +index are left intact. + +With `--patch`, you can interactively select hunks from the diff +between HEAD and the working tree to be stashed. The stash entry is +constructed such that its index state is the same as the index state +of your repository, and its worktree contains only the changes you +selected interactively. The selected changes are then rolled back +from your worktree. See the ``Interactive Mode'' section of +linkgit:git-add[1] to learn how to operate the `--patch` mode. ++ +The `--patch` option implies `--keep-index`. You can use +`--no-keep-index` to override this. + +When pathspec is given to 'git stash push', the new stash entry records the +modified states only for the files that match the pathspec. The index +entries and working tree files are then rolled back to the state in +HEAD only for these files, too, leaving files that do not match the +pathspec intact. + +When no `` is given, `stash@{0}` is assumed, otherwise `` must +be a reference of the form `stash@{}`. + DISCUSSION ---------- -- gitgitgadget