Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [PATCH 4/6] stash: introduce 'git stash store'

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:14

Ramkumar Ramachandra [off-list ref] writes:
Junio C Hamano wrote:
quoted
        git stash store [-m <message>] [-e <error message>] $stash_sha1
...
3. Why are we designing a command-line interface?  git stash store
"$stash_sha1" "$message" is sufficient for scripts, and there is
absolutely no point in parsing '-m', '-e', or any such thing.
"git stash store $stash_sha1 $message [ $error_message ]" is
adequate an internal API _for now_.

I however suspect that you would regret later when you need more
customization.  It already happened once for "git merge" when it was
an internal API for "git pull" and it was painful to support saner
interface and the traditional one at the same time [*1*].

[Footnote]

*1* And no, don't even try to rewrite "git merge" call inside "git
pull" to use the modern style with "-m <message>"; you will likely
break it (I've tried once and decided it was not worth the hassle).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help