Re: [PATCH v3] Expand ~ and ~user in core.excludesfile, commit.template
- Date: Fri, 29 Aug 2008 09:00:45 +0200
- From: Johannes Sixt <j.sixt@xxxxxxxxxxxxx>
- Subject: Re: [PATCH v3] Expand ~ and ~user in core.excludesfile, commit.template
Karl Chen schrieb: > + const char *after_username = strchr_or_end(path+1, '/'); Use strchrnul() instead of a home-grown strchr_or_end(). > + struct passwd *pw = getpw_strspan(path+1, after_username); > + if (!pw) return NULL; > + return concatstr(buf, pw->pw_dir, after_username, sz); You really should use the strbuf API here. Look for strbuf_detach() in the existing code. -- Hannes -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
- References:
- [PATCH] Support "core.excludesfile = ~/.gitignore"
- From: Karl Chen
- Re: [PATCH] Support "core.excludesfile = ~/.gitignore"
- From: Junio C Hamano
- Re: [PATCH] Support "core.excludesfile = ~/.gitignore"
- From: Karl Chen
- Re: [PATCH] Support "core.excludesfile = ~/.gitignore"
- From: Junio C Hamano
- Re: [PATCH] Support "core.excludesfile = ~/.gitignore"
- From: Jeff King
- Re: [PATCH] Support "core.excludesfile = ~/.gitignore"
- From: Junio C Hamano
- Re: [PATCH] Support "core.excludesfile = ~/.gitignore"
- From: Jeff King
- Re: [PATCH] Support "core.excludesfile = ~/.gitignore"
- From: Junio C Hamano
- [PATCH v2] Support "core.excludesfile = ~/.gitignore"
- From: Karl Chen
- Re: [PATCH v2] Support "core.excludesfile = ~/.gitignore"
- From: Jeff King
- Re: [PATCH v2] Support "core.excludesfile = ~/.gitignore"
- From: Karl Chen
- Re: [PATCH v2] Support "core.excludesfile = ~/.gitignore"
- From: Junio C Hamano
- [PATCH v3] Expand ~ and ~user in core.excludesfile, commit.template
- From: Karl Chen
- [PATCH] Support "core.excludesfile = ~/.gitignore"
- Prev by Date: Re: Future suggestion's to assist with changes to git.
- Next by Date: Re: [QGIT RFC] Unit tests for QGit
- Previous by thread: Re: [PATCH v4] Expand ~ and ~user in core.excludesfile, commit.template
- Next by thread: Re: [PATCH v2] Support "core.excludesfile = ~/.gitignore"
- Index(es):