Subject: Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

From: David Turner <[email-masked]>
Date: Thu, 10 Dec 2015 14:36:01 -0500

On Thu, 2015-12-10 at 13:02 -0500, Jeff King wrote:
> On Wed, Dec 02, 2015 at 07:35:18PM -0500, David Turner wrote:
> 
> > @@ -510,9 +511,36 @@ int validate_headref(const char *path)
> >  	unsigned char sha1[20];
> >  	int fd;
> >  	ssize_t len;
> > +	struct refdb_config_data refdb_data = {NULL, NULL};
> > +
> > +	if (lstat(path, &st) < 0) {
> > +		int backend_type_set;
> > +		struct strbuf config_path = STRBUF_INIT;
> > +		if (path) {
> > +			char *pathdup = xstrdup(path);
> > +			char *git_dir = dirname(pathdup);
> > +			strbuf_addf(&config_path, "%s/%s", git_dir, "config");
> > +			free(pathdup);
> > +		} else {
> > +			strbuf_addstr(&config_path, "config");
> > +		}
> 
> Can we ever follow this "else" branch? It would mean feeding NULL to
> lstat.

Probably cruft from an old version of the patch.  Removed if/else.
Thanks.