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=-4.0 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 7126A1F45E for ; Thu, 13 Feb 2020 17:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728186AbgBMRM4 (ORCPT ); Thu, 13 Feb 2020 12:12:56 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:38526 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727658AbgBMRM4 (ORCPT ); Thu, 13 Feb 2020 12:12:56 -0500 Received: by mail-pj1-f65.google.com with SMTP id j17so2688899pjz.3 for ; Thu, 13 Feb 2020 09:12:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rdJdD1KYJsosbhk0ADHwLPp0q98KkTZYg1loCThNSl8=; b=VLBD0QpGAFkaqWzfNCuDaap5fLtZL3VevyH/AE2l+yJwnIu7pwfwpsy3BAL7dYFJst F+aaG5OifYOyicu7fTT3RM6K0lNgmcMfu99S3sauFtQjDdSWAPhWwES8WMZKBroONvhB EeVc7lH7mHrXt6MGJa0+spO/ADHu6j1YXsy5mxBVStGgYteqfIv3PQsfJE/EhsqvojWZ MdcsSh+xkkhbRaR6RAo82kYLAgcOI3kHmU1+u8YcCBfbHLxnYQhGSWZJGGgiMu5NAdev ArMw4lW4ypmQT8xw2c1i96nh5/ljDZFPvxkKIznH4EPhouhzbBo3LmoUcajljzFB7/kS TX0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rdJdD1KYJsosbhk0ADHwLPp0q98KkTZYg1loCThNSl8=; b=b+cUSDMqH2Kmq/mYx7cw8wWU0QzoGroWUFZVh1L/5fOMUIc7vc0Oe8Q/D5L+7MDrvj vkOtPug4DrWeNvvYaf/gdLoy9NsLcYaWZaDpyObX1MByOFb9P1GszjBgn+Nyj2pMW9dH 4ZAhNZ6R1O5DDOuAWzexBSo2fkVf6klB6dn88mS7mq2VqAX/M6885tkDhvB4hwdZRK63 2aliq2gpXYvETCOfowDxFYBmmd9nzPvWco4oA0vt3YiJCHFx4HZrl2iVPP3+F1+d4Hut yT/m3CT0/wO+enbKu4nBf05YGLBS6D9YfPYs0+zGJzVIkrx6fO6Qi/JAxTPKwkgSyQ0M VJTA== X-Gm-Message-State: APjAAAU8/o2+LE5R5D+77++OKUzITNAGyS9Y+9UjSRVl/3fRBCDTs2TT BXbb97gi/H6J0CMEuZG9PwujlzQKPKn9m5uQ54grhitG0Uk= X-Google-Smtp-Source: APXvYqw/jLWQC6ClZ1b1O5nVPuxSk1MIf3HYwIlCL0qfLGIU8N8S/cd/WfTOogvjIrLOpJc94QTVlFTHTMa+o3HwLq4= X-Received: by 2002:a17:90a:c385:: with SMTP id h5mr6238825pjt.122.1581613974573; Thu, 13 Feb 2020 09:12:54 -0800 (PST) MIME-Version: 1.0 References: <20200212235033.782656-1-eantoranz@gmail.com> In-Reply-To: From: Edmundo Carmona Antoranz Date: Thu, 13 Feb 2020 11:12:43 -0600 Message-ID: Subject: Re: [PATCH] [RFC PATCH] stash save/push: add --index-only option To: Junio C Hamano Cc: Git List Content-Type: text/plain; charset="UTF-8" Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, Feb 13, 2020 at 10:55 AM Junio C Hamano wrote: > IIUC, the simplest workflow using the new feature may go like this: > > $ edit file ;# edit a bit > $ git add file > $ edit file ;# even even more > $ git stash --cached > > After all of the above is done, "git stash list" may show that there > is a single stash that records the changes you made to the file > right after you added it, without your further changes (because you > are taking what is in the index). Your working tree has all the > changes you made to file, both before and after "git add", and your > index is clean. > > After you got yourself into this state where your index is clean, > your working tree file has all changes, and your stash entry has > only the earlier half of the change, what are you going to do with > that stash entry? If we learn the answer to that question, perhaps > we may find (or we may even have) a better or easier way to achieve > whatever you were planning to do with that stash entry by some other > means---it might not even involve "git stash"---but without knowing > that, we cannot tell if the new feature is a good idea. Actually, let this conversation burn in /dev/null. What I want to achieve (stash only some changes and not all of them) can be done by using git stash push providing pathspec. > > Thanks. Thank you!