git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Timur Tabi <timur@freescale.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: Document that gitweb deals with bare repositories
Date: Sat, 16 May 2009 10:14:27 +0200	[thread overview]
Message-ID: <200905161014.28521.jnareb@gmail.com> (raw)
In-Reply-To: <ed82fe3e0905151521m64df542eifca87073c4360fbf@mail.gmail.com>

On Sat, 16 May 2009, Timur Tabi wrote:
> On Fri, May 15, 2009 at 4:36 PM, Jakub Narebski <jnareb@gmail.com> wrote:

> > Gitweb can deal with non-bare repositories. It is only that because
> > gitweb is not interested in working area, it shows $GIT_DIR (path to
> > repository itself) as name/path to repository. Therefore repo/.git
> > for non-bare repositories, because it is repository itself that matters.
> 
> I understand that, but why does gitweb have to punish me because I
> give it more than it cares about?

Gitweb doesn't punish you for using non-bare repositories. Gitweb is
just consistent: all that matters to gitweb is repository itself
($GIT_DIR), therefore it uses 'project/.git' as a project name for
non-bare, because this is $GIT_DIR for it.

Besides, why do you care that your non-bare repositories have
'project/.git' as their name? As Junio wrote it is a good idea to be
able to distinguish between bare and non-bare repositories. Perhaps
I should remove description of workaround from the patch...


Anyway I'd rather not complicate further 6336 lines long 
gitweb/gitweb.perl, one of largest scripts in git repository. One would
have to add stripping s!/\.git$!! from repository path (project name)
on display, and do additional check for $path/.git when checking if
what we were given looks like git repository.

> 
> > If you provide access for others, i.e. if those repositories shown in
> > gitweb are public repositories, it is much better to use bare
> > repositories for that.
> 
> Why?  What difference does it make if they clone directly from my
> working tree, instead of some shadow repository?

Well, best practice is to not change (rewrite) published history. This
means that you very strongly shouldn't even use "git commit --amend",
neverthemind "git rebase" and reordering patches and squashing bugfixes
using "git rebase --interactive" (or other tools like StGit or Guilt)
on the branches you meant to share. Because otherwise you would seriously
inconvenience developers which base their work your work on
shared/published branch.

Also you should take into account that if you publish your working,
non-bare repositories, all your branches are visible to the world.
So unless you tell other developers which branches are meant to share,
and which are not, you would have trouble with working on topic branches.
And for more complicated features best practices demand that you do them
as a series of commits rather than one big complicated patch on feature
branch, and it is hard to create a perfect, or just good (so it doesn't
look like "A, B, oops fix A, C, oops revert B, oops fix C"), series of
commits on first try. And there is also bit of complication for other
developers if you, as best practices tell you should, delete no longer
used (merged in) short term feature branches; this would require pruning
remote-tracking branches by other developers.


So unless you work by yourself (and then see git-instaweb), it is really
better to have separate public publishing repository, which is bare.

-- 
Jakub Narebski
Poland

  parent reply	other threads:[~2009-05-16  8:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 20:49 Removing the trailing "/.git" from gitweb display? Timur Tabi
2009-05-15 21:14 ` J.H.
2009-05-15 21:17 ` [PATCH] gitweb: Document that gitweb deals with bare repositories Jakub Narebski
2009-05-15 21:24   ` Timur Tabi
2009-05-15 21:36     ` Jakub Narebski
2009-05-15 22:21       ` Timur Tabi
2009-05-16  2:29         ` Junio C Hamano
2009-05-16  8:14         ` Jakub Narebski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-12-29 20:26 gitweb $export_ok question Thomas Amsler
     [not found] ` <6db6bed70812311027g3be1cfbei35c014243237fd59@mail.gmail.com>
2009-01-01 22:51   ` Jakub Narebski
2009-01-03 13:23     ` [PATCH] gitweb: Document that gitweb deals with bare repositories Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200905161014.28521.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=timur@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).