From: Edmundo Carmona Antoranz <firstname.lastname@example.org> To: Junio C Hamano <email@example.com> Cc: Git List <firstname.lastname@example.org> Subject: Re: [PATCH] [RFC PATCH] stash save/push: add --index-only option Date: Thu, 13 Feb 2020 11:12:43 -0600 Message-ID: <CAOc6etYQPi6ghjVGdUc8Mk6oD946-YL35rJ3f9wKFSy74F450A@mail.gmail.com> (raw) In-Reply-To: <email@example.com> On Thu, Feb 13, 2020 at 10:55 AM Junio C Hamano <firstname.lastname@example.org> 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!
prev parent reply index Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-12 23:50 Edmundo Carmona Antoranz 2020-02-12 23:52 ` Edmundo Carmona Antoranz 2020-02-13 5:04 ` Junio C Hamano 2020-02-13 13:21 ` Edmundo Carmona Antoranz 2020-02-13 16:55 ` Junio C Hamano 2020-02-13 17:12 ` Edmundo Carmona Antoranz [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAOc6etYQPi6ghjVGdUc8Mk6oD946-YL35rJ3f9wKFSy74F450A@mail.gmail.com \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Mailing List Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/git/0 git/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 git git/ https://lore.kernel.org/git \ firstname.lastname@example.org public-inbox-index git Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git