git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wayne Davison <wayne@opencoder.net>
To: Jari Aalto <jari.aalto@cante.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] config.c: Expand $HOME and tilde character in core.excludesfile
Date: Mon, 28 Jan 2008 15:52:05 -0800	[thread overview]
Message-ID: <20080128235205.GE8669@blorf.net> (raw)
In-Reply-To: <y7a9aaem.fsf@blue.sea.net>

On Mon, Jan 28, 2008 at 11:49:05PM +0200, Jari Aalto wrote:
> +                        ret = str_replace(str, "~", home);

This would mangle a name with a tilde in it, e.g. "file.c~", etc.

> +                        ret = str_replace(str, "$HOME", home);

This would affect similarly named vars, e.g. $HOMER, etc.

> +                strcat( ptr, "");   /* Terminate with null string */

Calling strcat() requires a null-terminated string.  Instead, assign a
'\0' char at the right position.

..wayne..

      parent reply	other threads:[~2008-01-28 23:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 21:49 [PATCH] config.c: Expand $HOME and tilde character in core.excludesfile Jari Aalto
2008-01-28 22:28 ` Johannes Schindelin
2008-01-28 22:32 ` Jakub Narebski
2008-01-29  5:59   ` Miles Bader
2008-01-29  7:25     ` David Symonds
2008-01-29  7:51       ` Miles Bader
2008-01-28 23:52 ` Wayne Davison [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=20080128235205.GE8669@blorf.net \
    --to=wayne@opencoder.net \
    --cc=git@vger.kernel.org \
    --cc=jari.aalto@cante.net \
    /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).