On 09.04.2013, Ramkumar Ramachandra wrote:
> Jakub Narębski wrote:

>> Hmmm... I used to do (and still do) such not-recommended thing,
>> i.e. keeping git/gitweb/TODO etc. in git/gitweb/.git repository,
>> while having git/gitweb/gitweb.perl in git/.git repository.
> Why don't you put the gitweb/TODO in a different branch in the git.git
> repository?  Why do you feel the need to have two different
> repositories tracking different files in the same path?

It is not only gitweb/TODO.  If it was only that file, I could have
used 'gitweb/todo' branch for it, or something.  Though I would be
missing having it beside gitweb.perl, and having easy access to it
during work on gitweb.perl

I want to have various files that I use when working on gitweb.perl
(but should not and would not be in gitweb subsystem in git.git
repository) to be under version control, and be side-by-side near

These are:
* gitweb/TODO - TODO file for gitweb (personal, not often updated),
  and similar gitweb/gitwebs-whats-cooking.txt

  Might be put into 'gitweb/todo/TODO' file and 'gitweb/todo/.git'
  private repository (and perhaps 'gitweb/todo' branch of my clone
  of git.git repository).

* various *_test.perl files, where I test features to be possibly
  put into gitweb, like e.g. chop_str_test.perl or test_find_forks.perl
  (or similar benchmark_find_forks.perl)

* private personal configuration files for testing its output, like
  gitweb/gitweb_config.perl and gitweb/magic.txt !!!

  Those are very much required to reside beside gitweb/gitweb.perl
  because of default GITWEB_CONFIG value.  With those I can simply
  run current gitweb/gitweb.perl (sic!) from its directory while
  I am working on it.

> Just out of curiosity, how does stuff work with your setup?  Does the
> worktree gitweb/ belong to your gitweb.git repository or git.git
> repository?

The 'git/gitweb/' worktree belong to both repositories (it is 'gitweb/'
in git.git clone i.e. git/.git, and it is top dir of git/gitweb/.git

> How do half the git commands work?  For example, won't
> git clean -dfx remove the files tracked by your other repository?

They work, somewhat and with some care.  I don't use "git clean"
for example.

> Will a conflicting checkout not stomp files tracked by the other
> repository?  How are worktree-rules like .gitignore applied?

'git/gitweb/.gitignore' belong to 'git/gitweb/.git' repository
and is used to ignore 'git/.git' files (with the intent of marking
them untracked *precious*).  I could have used 'info/exclude'
here because this repository is for the time being private.

As gitweb subsystem in git.git is quite stable, untracked but
existing 'gitweb/.gitignore' doesn't usually matter, as all files
in 'gitweb/' are already tracked.  Besides I can always use
"git add -f" for adding to git.git if necessary (e.g. when splitting
gitweb.js etc.).

>> So my (admittedly strange) setup will stop working?
> Yes.  I would persuade you not to use such a gross setup; this is not
> what git was intended for at all.

Why not?

Jakub Narębski
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to