[PATCH v5 2/5] stash: convert apply to builtin

2018-04-04 Thread Joel Teichroeb
Add a bulitin helper for performing stash commands. Converting all at once proved hard to review, so starting with just apply let conversion get started without the other command being finished. The helper is being implemented as a drop in replacement for stash so that when it is complete it can s

Re: [PATCH v5 2/5] stash: convert apply to builtin

2018-04-05 Thread Christian Couder
On Thu, Apr 5, 2018 at 4:28 AM, Joel Teichroeb wrote: > Add a bulitin helper for performing stash commands. Converting > all at once proved hard to review, so starting with just apply > let conversion get started without the other command being > finished. > > The helper is being implemented as a

Re: [PATCH v5 2/5] stash: convert apply to builtin

2018-04-05 Thread Christian Couder
On Thu, Apr 5, 2018 at 9:50 AM, Christian Couder wrote: > > So maybe we can get rid of `result` and have something like: > >if (argc < 1) { >error(_("at least one argument is required")); >usage_with_options(git_stash_helper_usage, options); Maybe we could

Re: [PATCH v5 2/5] stash: convert apply to builtin

2018-04-05 Thread Christian Couder
On Thu, Apr 5, 2018 at 9:59 AM, Christian Couder wrote: > On Thu, Apr 5, 2018 at 9:50 AM, Christian Couder > wrote: >> >> So maybe we can get rid of `result` and have something like: >> >>if (argc < 1) { >>error(_("at least one argument is required")); >>us

Re: [PATCH v5 2/5] stash: convert apply to builtin

2018-04-05 Thread Johannes Schindelin
Hi Christian, [please cull a *lot* more of the quoted mail when you do not reference any of it... Thanks] On Thu, 5 Apr 2018, Christian Couder wrote: > On Thu, Apr 5, 2018 at 4:28 AM, Joel Teichroeb wrote: > > > > [...] > > + > > + revision = info->revision.buf; > > + > > + if (get_

Re: [PATCH v5 2/5] stash: convert apply to builtin

2018-04-06 Thread Johannes Schindelin
Hi Joel, On Wed, 4 Apr 2018, Joel Teichroeb wrote: > Add a bulitin helper for performing stash commands. Converting > all at once proved hard to review, so starting with just apply > let conversion get started without the other command being s/let/lets the/ s/command/commands/ > finished. > >

Re: [PATCH v5 2/5] stash: convert apply to builtin

2018-04-06 Thread Johannes Schindelin
Hi Joel, completely forgot to reiterate this (my reply to Christian was probably buried in the thread): On Wed, 4 Apr 2018, Joel Teichroeb wrote: > +int cmd_stash__helper(int argc, const char **argv, const char *prefix) > +{ > + int result = 0; > + pid_t pid = getpid(); > + const cha