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=-5.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,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 2517E1F8C6 for ; Sun, 5 Sep 2021 19:02:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232591AbhIETD1 (ORCPT ); Sun, 5 Sep 2021 15:03:27 -0400 Received: from shell1.rawbw.com ([198.144.192.42]:50100 "EHLO shell1.rawbw.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbhIETD1 (ORCPT ); Sun, 5 Sep 2021 15:03:27 -0400 Received: from yv.noip.me (c-73-189-35-76.hsd1.ca.comcast.net [73.189.35.76]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 185J2MWb001180 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 5 Sep 2021 12:02:23 -0700 (PDT) (envelope-from yuri@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host c-73-189-35-76.hsd1.ca.comcast.net [73.189.35.76] claimed to be yv.noip.me Subject: Re: stash push/pop unstages files? To: Chris Torek Cc: Git Mailing List References: <0e1f7a47-89e3-5f49-663e-bdd3e8efb6e5@rawbw.com> From: Yuri Message-ID: <5f09cba9-b7dc-d7b6-1d3f-e7fb8ca28c6c@rawbw.com> Date: Sun, 5 Sep 2021 12:02:21 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 9/5/21 10:15 AM, Chris Torek wrote: > It does,*provided* you invoke the pop step with `--index`. > > When `git stash push` makes a stash, it saves both the index > (staging area) and working tree, as two separate commits. Why 'stash push' and 'stash pop' are asymmetric in what they do by default? Wouldn't it make more sense to make 'stash pop' precisely revert what 'stash push' does, and have an option '--no-index' instead? Yuri