Re: [PATCH] Add platform-independent .git "symlink"

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

 



Johannes Schindelin wrote:
> Hi,
> 
> On Mon, 4 Feb 2008, Brandon Casey wrote:

> In my local version of git, you can say "git 
> branch --new-workdir=../bla new-branch [branch-point]".

Ah, I see, you are creating a new branch too.

>> Have you thought about using git-clone instead?
> 
> Briefly.  But this is not about cloning the repository.  It is about 
> having an additional working directory for the current repository.

I think that is true at the low level, but from a high level it feels
similar to me.

After your "git branch --new-workdir=..." you have something that acts
exactly like a full-fledged repository. It is very much dependent on
the original repo, similarly to how a --shared repo is, and it now
has new semantics in that operations within the new repo have an effect
in the original repo (and vice-versa). Making new repositories from
existing repositories is what git-clone does.

  git-branch: makes new branches, or generally handles modifying branches.
git-checkout: modifies the contents of the working directory.
   git-clone: makes new repositories from existing repositories.

Also, of the three, git-clone is the only one allowed to operate outside
of the repo. The other two are required to be called from within a repo
(or have GIT_DIR set), and currently only modify data within that repo.
So, allowing them to have an effect outside of the repo would extend
their current scope of operation.

>> It seems a good fit but would require a new option to specify a branch 
>> to checkout (which I believe is a requested feature for clone).
> 
> It is an often-requested feature for clone, but we have "clone -n" for 
> now, and nobody seemed to care deeply enough to actually do something 
> about it.

I'll probably do it if it is not beyond me.

> I _want_ the original 
> repository to know that there is another working directory.

Yes, your ideas are much better than simply adding the functionality of
the git-new-workdir script (which is what I was planning on doing btw :)

-brandon

-
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]

  Powered by Linux