Re: How de-duplicate similar repositories with alternates
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 5, 2018, 03:30 UTC
- Message-ID
- <xmqq4lbsejld.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <87tvjtvah0.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> I think a warning (or even error) like this would be more useful: > > test ! -d $objdir && error... # current behavior > test -d $objdir/objects && error "Did you mean $objdir/objects, silly?" # new error
If it is an error common enough, perhaps we could even DWIM it, I guess, that is...
if test ! -d $objdir then error elif test -d $objdir/objects/pack then possibly warn objdir=$objdir/objects fi
> I.e. I suspect I'm not the only one who's not read the documentation > carefully enough and thought it was a path to the root of the repo and > wondered why it silently didn't work.