Re: slight addition to t.gummerer's proposed "git stash" patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/11, Robert P. J. Day wrote:
> 
>   was perusing thomas gummerer's proposed "git stash" patch here:
> 
> https://www.spinics.net/lists/git/msg313993.html
> 
> and i'd make one more change -- i'd separate the OPTIONS entries for
> "git stash push" and "git stash save" so they don't end up being
> rendered all crushed together when displaying the man page:

I for one would like that.  I sent a patch recently [1] that would
show git stash push first on the man page, which didn't seem to get
much traction.  This goes a bit further than that, which I'd be happy
with.

[1]: https://public-inbox.org/git/20171005201029.4173-1-t.gummerer@xxxxxxxxx/

> OPTIONS
>    save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet]
>    [<message>], push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all]
>    [-q|--quiet] [-m|--message <message>] [--] [<pathspec>...]
>        Save your local modifications to a new stash and roll them back to HEAD (in the working
>        tree and in the index). The <message> part is optional and gives the description along
>        with the stashed state.
>        ... snip ...
> 
> so rather than:
> 
> OPTIONS
> -------
> 
> push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked]
> [-a|--all] [-q|--quiet] [-m|--message <message>] [--]
> [<pathspec>...]::
> save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked]
> [-a|--all] [-q|--quiet] [<message>]::
> 
>     Save your local modifications to a new 'stash entry' and roll them
>     back to HEAD (in the working tree and in the index).
>     The <message> part is optional and gives
>     the description along with the stashed state.
>     ...
> 
> i'd suggest:
> 
> push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked]
> [-a|--all] [-q|--quiet] [-m|--message <message>] [--]
> [<pathspec>...]::
> 
>     Save your local modifications to a new 'stash entry' and roll them
>     back to HEAD (in the working tree and in the index).
>     The <message> part is optional and gives
>     the description along with the stashed state.
>     ...
> 
> save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked]
> [-a|--all] [-q|--quiet] [<message>]::
> 
>     This option is deprecated in favour of 'git stash push'.

This sounds good to me.  This can probably be done at the same time
(or after) something like my patch [2], which removes the mentions of
'git stash save' from the man pages, and replaces them with 'git stash
push'.  I guess it would be a bit confusing to see a deprecated
command in the man pages, especially since there is a good (almost
drop-in) replacement :)

[2]: https://public-inbox.org/git/20171005200049.GF30301@hank/#t

> or something like that.
> 
> rday
> 
> -- 
> 
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
> 
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
> 



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux