Re: [PATCH 09/15] sequencer: lib'ify create_seq_dir()

2016-08-24 Thread Johannes Schindelin
Hi Eric,

On Wed, 24 Aug 2016, Eric Sunshine wrote:

> On Tue, Aug 23, 2016 at 12:07 PM, Johannes Schindelin
>  wrote:
> > To be truly useful, the sequencer should never die() but always return
> > an error.
> >
> > Signed-off-by: Johannes Schindelin 
> > ---
> > diff --git a/sequencer.c b/sequencer.c
> > @@ -839,8 +839,8 @@ static int create_seq_dir(void)
> > return -1;
> > }
> > else if (mkdir(git_path_seq_dir(), 0777) < 0)
> > -   die_errno(_("Could not create sequencer directory %s"),
> > - git_path_seq_dir());
> > +   return error(_("Could not create sequencer directory %s 
> > (%s)"),
> > + git_path_seq_dir(), strerror(errno));
> 
> error_errno()?

Yep!

Thanks,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 09/15] sequencer: lib'ify create_seq_dir()

2016-08-24 Thread Eric Sunshine
On Tue, Aug 23, 2016 at 12:07 PM, Johannes Schindelin
 wrote:
> To be truly useful, the sequencer should never die() but always return
> an error.
>
> Signed-off-by: Johannes Schindelin 
> ---
> diff --git a/sequencer.c b/sequencer.c
> @@ -839,8 +839,8 @@ static int create_seq_dir(void)
> return -1;
> }
> else if (mkdir(git_path_seq_dir(), 0777) < 0)
> -   die_errno(_("Could not create sequencer directory %s"),
> - git_path_seq_dir());
> +   return error(_("Could not create sequencer directory %s 
> (%s)"),
> + git_path_seq_dir(), strerror(errno));

error_errno()?

> return 0;
>  }
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 09/15] sequencer: lib'ify create_seq_dir()

2016-08-23 Thread Johannes Schindelin
To be truly useful, the sequencer should never die() but always return
an error.

Signed-off-by: Johannes Schindelin 
---
 sequencer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sequencer.c b/sequencer.c
index 1bcea84..1706ef4 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -839,8 +839,8 @@ static int create_seq_dir(void)
return -1;
}
else if (mkdir(git_path_seq_dir(), 0777) < 0)
-   die_errno(_("Could not create sequencer directory %s"),
- git_path_seq_dir());
+   return error(_("Could not create sequencer directory %s (%s)"),
+ git_path_seq_dir(), strerror(errno));
return 0;
 }
 
-- 
2.10.0.rc1.99.gcd66998


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html