git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [Patch] Documentation: enhanced "git for CVS users" doc about shared repositories

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 5, 2007, 23:52 UTC
Message-ID
<7v8x5cmern.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<472F99F8.4010904@gmail.com>
Francesco Pretto <ceztkoml@gmail.com> writes:
Show 27 quoted lines
> More detailed instructions on how to set up shared repositories.
> Added a reference to "git for CVS users" doc in git-init manual.
>
> Signed-off-by: Francesco Pretto <ceztkoml@gmail.com>
> ---
>  Documentation/cvs-migration.txt |   72 ++++++++++++++++++++++++++++++--------
>  Documentation/git-init.txt      |    7 ++++
>  2 files changed, 64 insertions(+), 15 deletions(-)
>
> diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt
> index 3b6b494..c92ed49 100644
> --- a/Documentation/cvs-migration.txt
> +++ b/Documentation/cvs-migration.txt
> @@ -13,12 +13,12 @@ link:tutorial.html[tutorial introduction to git] should be sufficient.
>  Developing against a shared repository
>  --------------------------------------
>  
> -Suppose a shared repository is set up in /pub/repo.git on the host
> +Suppose a shared repository is set up in /pub/scm/repo.git on the host
>  foo.com.  Then as an individual committer you can clone the shared
>  repository over ssh with:
>  
>  ------------------------------------------------
> -$ git clone foo.com:/pub/repo.git/ my-project
> +$ git clone foo.com:/pub/scm/repo.git/ my-project
>  $ cd my-project
>  ------------------------------------------------
This part seems an unnecessary change.
Show 12 quoted lines
> @@ -68,37 +68,79 @@ other than `master`.
>  Setting Up a Shared Repository
>  ------------------------------
>  
> -We assume you have already created a git repository for your project,
> -possibly created from scratch or from a tarball (see the
> -link:tutorial.html[tutorial]), or imported from an already existing CVS
> -repository (see the next section).
> +We assume you have admin privilege on the remote machine. Moreover, we assume
> +you have already created a git repository for your project, possibly created
> +from scratch or from a tarball (see the link:tutorial.html[tutorial]),or
> +imported  from an already existing CVS repository (see the next section).
Don't assume the "admin privilege" part, as you do not have to.

You are newly hired to work on project-X, and the sysadm throws you into projectx group. Thesysadm further prepares a directory '/pub/project-X' and makes it mode 2775 (aka ug=rwx,o=rx,g+s).

Do you want to create a new repository for projext-X group's use? You do:

	$ cd /pub/project-X
        $ GIT_DIR=mine.git git init --shared

and you now have a usable /pub/project-X/mine.git repository for project members. I do not think you would need any chmod/chgrp after this step.

Show 6 quoted lines
> +First, let's create a common directory for all the projects you'll want to
> +track with git:
> +
> +-----------------------------------------------
> +$ mkdir -p /pub/scm
> +-----------------------------------------------

An organization may use different SCM depending on the projects' needs, and there is no reason members of projects A and B should be in the same group 'git' while having members of project C in group 'hg' only because A and B happen to use git. It would make more sense to either (1) make members of all three projects belong to 'src' group, or (2) make three groups, one for each project.

IOW, I do not think the above is a good suggestion.

Also with the "create new --shared repository for the project in a group's directory that has mode 2755" approach, I do not think there is any need to muck with umask either.

Previous: Francesco PrettoNext: Francesco Pretto
Message 2 of 18 in “Documentation: enhanced "git for CVS users" doc about shared repositories”
  1. Documentation: enhanced "git for CVS users" doc about shared repositoriesFrancesco Pretto, Nov 5, 2007
  2. Junio C HamanoNov 5, 2007
  3. Francesco PrettoNov 6, 2007
  4. Johannes SchindelinNov 6, 2007
  5. Francesco PrettoNov 6, 2007
  6. Francesco PrettoNov 6, 2007
  7. Junio C HamanoNov 6, 2007
  8. Francesco PrettoNov 7, 2007
  9. Johannes SchindelinNov 7, 2007
  10. Francesco PrettoNov 7, 2007
  11. AghilesNov 7, 2007
  12. Steffen ProhaskaNov 7, 2007
  13. Andreas EricssonNov 7, 2007
  14. David KastrupNov 7, 2007
  15. J. Bruce FieldsNov 7, 2007
  16. Wincent ColaiutaNov 7, 2007
  17. Steffen ProhaskaNov 7, 2007
  18. J. Bruce FieldsNov 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.