On Wed, Jul 13, 2016 at 09:21:37AM +0200, Matthieu Moy wrote: > > +static int prepare_include_condition_pattern(struct strbuf *pat) > > +{ > > + int prefix = 0; > > + > > + /* TODO: maybe support ~user/ too */ > > + if (pat->buf[0] == '~' && is_dir_sep(pat->buf[1])) { > > + struct strbuf path = STRBUF_INIT; > > + const char *home = getenv("HOME"); > > + > > + if (!home) > > + return error(_("$HOME is not defined")); > > expand_user_path in path.c seems to do the same as you're doing (but > does deal with ~user). Any reason not to use it? I had a similar question, which Duy answered in: http://article.gmane.org/gmane.comp.version-control.git/298528 It does feel pretty hacky, though (especially for a case that seems unlikely to come up: people having wildcard patterns in the name of their home directory). -Peff -- 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