git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Karsten Blees <karsten.blees@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 3/3] use xgetcwd() get the current directory or die
Date: Sun, 20 Jul 2014 17:21:57 +0200	[thread overview]
Message-ID: <53CBDE95.7050105@web.de> (raw)
In-Reply-To: <CACsJy8CX5iDejuKZSEoeP_mNCyGzpZ+vQteYfQosw6x6aBJvbw@mail.gmail.com>

Am 20.07.2014 14:45, schrieb Duy Nguyen:
> On Sun, Jul 20, 2014 at 6:22 PM, René Scharfe <l.s.r@web.de> wrote:
>> Convert several calls of getcwd() and die() to use xgetcwd() instead.
>> This way we get rid of fixed-size buffers (which can be too small
>> depending on the used file system) and gain consistent error messages.
>>
>> Signed-off-by: Rene Scharfe <l.s.r@web.de>
>> ---
>>   builtin/init-db.c   | 17 ++++++++---------
>>   builtin/rev-parse.c |  6 +++---
>>   dir.c               | 12 ++++++++----
>>   trace.c             |  7 ++++---
>>   4 files changed, 23 insertions(+), 19 deletions(-)
>
> There should be a 4/3 to replace the remaining getcwd with
> strbuf_getcwd. But I guess we could add that to the low hanging fruit
> list.

I left out the cases with the go-there-then-come-back pattern on 
purpose, as they hopefully can be changed to cease using getcwd() in the 
first place.  But I'll include another example (in addition to 
xgetcwd()) in the reroll.

René

      reply	other threads:[~2014-07-20 15:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-20 11:18 [PATCH 0/3] getcwd without PATH_MAX René Scharfe
2014-07-20 11:21 ` [PATCH 1/3] strbuf: add strbuf_add_cwd() René Scharfe
2014-07-20 12:33   ` Duy Nguyen
2014-07-20 15:21     ` René Scharfe
2014-07-20 11:21 ` [PATCH 2/3] wrapper: add xgetcwd() René Scharfe
2014-07-20 12:35   ` Duy Nguyen
2014-07-20 15:22     ` René Scharfe
2014-07-20 11:22 ` [PATCH 3/3] use xgetcwd() get the current directory or die René Scharfe
2014-07-20 12:45   ` Duy Nguyen
2014-07-20 15:21     ` René Scharfe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53CBDE95.7050105@web.de \
    --to=l.s.r@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=karsten.blees@gmail.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).