Re: [PATCH] Make logAllRefUpdates true by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I do not think I can take this patch in its current form.

Although I think majority of users would find it convenient to
have ref-log enabled by default on repositories to be developed
in, it does not make sense to enable ref-log by default for bare
repositories that is used as a distribution point.  So at least
this needs an option to disable it (if you make it the default),
or enable it.

        Side note.  A ref-log at a distribution point _could_ be
        used for somebody to say "Hey, I pushed that fix three
        days ago -- why are you complaining about the breakage
        I've already fixed before checking the public tip?", but
        that is a manifestation of lack of communication among
        people and a SCM is not about solving that problem.

But having to add an option tends to drive people nuts.  We
already have --shared and --template, so adding --with-reflog
would be "just one more option" that we may not have to worry
too much about, but we would have to revisit this as we gain
more experience using git and more best-current-practices are
learned.  I wonder if we can infer if a particular invocation of
init-db is to prepare a repository to be developed in without
being told with a command line option.  If we can do so, then we
can do the configuratio setting with --with-reflog=[yes|no|guess]
option (and lack of --with-reflog means "guess").

There are three use cases that init-db is run directly from the
command line, and I think you want different behaviours.

 (1) you have a directory, perhaps already with many files
     there, because you are doing an initial import to prepare a
     repository to work in.  You obviously want a ref-log there,
     and you want --shared=no.  You do not care about
     denyNonFastForwards because you are not likely to be
     pushing into it.

 (2) you are preparing a public distribution point for _your_
     own tree.  You do not want a ref-log, you want --shared=no,
     and you _might_ want denyNonFastForwards.

 (3) you are preparing a public shared repository for project
     members to use to synchronize, CVS-style.  You do not want
     a ref-log, you do want --shared=group, and and you want
     denyNonFastForwards.

Another case that init-db is run indirectly is via git-clone and
via foreign SCM importers.  I think enabling ref-log during
non-bare clone, for example, should behave similarly to (1)
because the resulting repository is clearly meant to be used
with a working tree in which to develop.  A bare clone is either
(2) or (3) but you do not have to decide what to do with ref-log
(i.e. "don't").  But in these "indirect" cases, the command that
drives init-db can explicitly tell init-db what it is doing, and
we would need to have both --with-reflog and --without-reflog
options so that the command can tell what it wants from init-db
explicitly without having init-db guess.

If you can come up with a reliable way to tell (1)..(3) then we
can make init-db to do the right thing without an end user to
tell what should happen --with-reflog or --without-reflog; and
they do not even have to say --shared anymore as an added bonus.

Having thought about all the above, I think the event to create
distribution/synchronization point repositories are rare enough
and the simplest and cleanest way might be to make it default
and add a --without-reflog option to the command, and forget
about the guessing.


-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]