git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/3] short syntaxes for 'git stash'

From
Jeff King <peff@peff.net>
Date
Aug 18, 2009, 23:31 UTC
Message-ID
<20090818233153.GA6304@sigill.intra.peff.net>
In-Reply-To
<1250631523-10524-1-git-send-email-Matthieu.Moy@imag.fr>
On Tue, Aug 18, 2009 at 11:38:40PM +0200, Matthieu Moy wrote:
Show 8 quoted lines
> This small patch serie is based on the following commit in pu:
> 
> dda1f2a Implement 'git stash save --patch'
> 
> It is meant to replace two commits already there:
> 
> ea41cfc Make 'git stash -k' a short form for 'git stash save --keep-index'
> f300fab DWIM 'git stash save -p' for 'git stash -p'

Actually, these are already in 'next', so they can't be simply replaced. So you would need to re-roll patches 1 and 2 at the very least.

However, thinking more on it, I think we can address Dscho's concern with your proposal to accept only a limited set of options. And looking at what's in f300fab, it actually does make an attempt to allow multiple options, but it doesn't cover all cases (e.g., I can use "-p --no-keep-index" but not "--no-keep-index -p". Nor can I do "-p -k"; even though "-k" is implied by "-p", you will get a very strange usage mention instead of it being a silent no-op).

So there are two issues:
  - refactoring to allow arbitrary combinations of -k/-p and variants.
  - allowing other options; I believe "-q" is the only one. That seems
    to be specific to Dscho's objection, as it is ambiguous with other
    subcommands. Though "-p" may also become ambiguous, if we get "stash
    apply -p" soon.

I think the first one should be fairly uncontroversial. I'm not sure about the second.

-Peff
Previous: Jeff KingNext: Johannes Schindelin
Message 15 of 22 in “stash: accept options also when subcommand 'save' is omitted”
  1. stash: accept options also when subcommand 'save' is omittedMatthieu Moy, Aug 18, 2009
  2. Matthieu MoyAug 18, 2009
  3. Jeff KingAug 18, 2009
  4. Junio C HamanoAug 18, 2009
  5. 0/3 short syntaxes for 'git stash'Matthieu Moy, Aug 18, 2009
  6. 1/3 stash: accept -k as a shortcut for --keep-indexMatthieu Moy, Aug 18, 2009
  7. 2/3 stash: accept options also when subcommand 'save' is omittedMatthieu Moy, Aug 18, 2009
  8. 3/3 stash: reject stash name starting with a dash.Matthieu Moy, Aug 18, 2009
  9. Jeff KingAug 18, 2009
  10. Junio C HamanoAug 18, 2009
  11. Jeff KingAug 18, 2009
  12. Junio C HamanoAug 18, 2009
  13. Matthieu MoyAug 19, 2009
  14. Jeff KingAug 19, 2009
  15. Jeff KingAug 18, 2009
  16. Johannes SchindelinAug 18, 2009
  17. Matthieu MoyAug 18, 2009
  18. Johannes SchindelinAug 18, 2009
  19. Matthieu MoyAug 19, 2009
  20. Jeff KingAug 18, 2009
  21. Johannes SchindelinAug 18, 2009
  22. Jeff KingAug 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.