Re: [PATCH] Don't create the $GIT_DIR/branches directory on init

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Don't create the $GIT_DIR/branches directory on init

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:39

Thomas Rast [off-list ref] writes:
Robin Rosenberg wrote:
quoted
Git itself does not even look at this directory.
Modern git Porcelains write remote definitions solely to .git/config, but
still reads from .git/{branches,remotes}.  What we do not do is to update
these locations, and we do not need to have these locations to operate.

So "not even look at" is too strong; it just "not touch".

I do not think there is reason to change that part of the equation.  For
people who need to fetch and merge hundreds of random places, it is a lot
handier to be able to do

	echo "$url#$branch" >.git/branch/$nickname
        rm .git/branch/$nickname

to manage the set of locations added to and deleted from the daily
compose.  Andrew Morton explicitly asked for this to be kept a few years
ago and I do not see a reason to deprecate this.

Now, not installing an empty .git/branch directory does break the above
workflow.  You would need to mkdir _once_ yourself, but I do not think
that is such a big deal.

On the other hand, I do not think it is such a big deal to have otherwise
unused .git/branches/ directory, either.  Robin wrote:

    Shawn and other wants to stop JGit from creating this directory on
    init with the motivation that newer Git version doesn't create it
    anymore. This patch would make that assertion true.

and after re-reading it, I realize "the motivation" is not a motivation at
all---it is merely an excuse ("after this patch is applied, git wouldn't
create it anymore"---so JGit will have an excuse not to do so).  It does
not say _why_ it shouldn't be there in the first place.  IOW, we need to
fill in the blank in: "JGit is merely following suit; the reason git
stopped creating the directory is ________").

This patch alone breaks tests in the t55?? series quite a lot, and I am
tempted to revert it.  My time is more valuable than fixing the fallouts
from this change, when the real purpose of the change is not yet stated.

Re: [PATCH] Don't create the $GIT_DIR/branches directory on init

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:47:39

Junio C Hamano [off-list ref] wrote:
Modern git Porcelains write remote definitions solely to .git/config, but
still reads from .git/{branches,remotes}.
...
Andrew Morton explicitly asked for this to be kept a few years
ago and I do not see a reason to deprecate this.
...
    Shawn and other wants to stop JGit from creating this directory on
I probably said something like this.  I won't bother denying it,
because list archives are more accurate than my own fallible memory.

But I didn't know the Andrew Morton part above.  After hearing it
from you, I'm reversing my (apparent) direction here.  We should
continue to create the branches directory within a new repository.

Sorry Robin, but Andrew Morton matters.  Its one stupid unused
directory in a repository that will chew through thousands of inodes
as loose objects.  Its a drop in the bucket in terms of resource
cost used by Git.  And Andrew is someone whose workflow we don't
want to break if we can avoid it.  He's a long time Git user who is
also high up in the kernel food chain.  Interrupting him disrupts
a fair chunk of kernel work while he grumbles about the Goddamn
Idiotic Truckload of s**t that Linus begat.
This patch alone breaks tests in the t55?? series quite a lot,
Drop the patch.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help