All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Rogan Dawes <lists@dawes.za.net>
Cc: Jakub Narebski <jnareb@gmail.com>,
	Filippo Zangheri <filippo.zangheri@yahoo.it>,
	git@vger.kernel.org
Subject: Re: [QUESTION] Selective fetch possible?
Date: Tue, 11 Mar 2008 03:50:53 -0400	[thread overview]
Message-ID: <20080311075053.GQ8410@spearce.org> (raw)
In-Reply-To: <47D6341C.7030505@dawes.za.net>

Rogan Dawes <lists@dawes.za.net> wrote:
> Jakub Narebski wrote:
> >"Shawn O. Pearce" <spearce@spearce.org> writes:
> >
> >>Filippo Zangheri <filippo.zangheri@yahoo.it> wrote:
> >>>Is it possible to git-fetch only a portion of the tree
> >>>of the specified repository, say, fetch only one directory or a
> >>>subset of files matching some regular expression?
> 
> >The problem is twofold, as far as I understand it.  First, what to do
> >if there is merge conflicts outside checked out (selected) directory?
> 
> This is something that has been repeated many times, and I fail to see 
> how it can be an issue. How can there be a conflict in a directory that 
> is not, and never has been, checked out, and therefore cannot have been 
> modified?

Given two branches:

	code
	docs

and the code people checkout the "src/" subdirectory and the docs
people checkout the "Documentation/" subdirectory, and they *only*
every work in that subdirectory, things are fine.

Until one day some developer also checks out "Documentation/" and
fixes something in the documentation as part of the same commit
that makes a code change.  The push this to the code branch.

Someday in the future a documentation writer merges the code branch
over to the docs branch, "just keeping it current".

Now there arises a possiblity of a merge conflict in a part of the
tree that you do not have checked out.


If you want to say "don't ever modify stuff outside of your branch's
purpose" then why aren't you just using submodules (one for docs and
one for code) and using a supermodule to tie everything together into
a "release package"?

> >Second, how to make repository contain only relevant objects: git in
> >many places assumes full connectivity, and that if it has an object it
> >hass all objects depending on it.
> >
> 
> Yes, this is the big problem as I see it.

This is easy enough that if the above problem could be resolved
sufficiently to the git gurus' satisfaction you would be able
to get some advice on how to solve it.  Its not difficult, just
damn annoying.  We already do it (to some extent) with grafts and
shallow clones.

-- 
Shawn.

  reply	other threads:[~2008-03-11  7:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-10 22:02 [QUESTION] Selective fetch possible? Filippo Zangheri
2008-03-10 22:53 ` Shawn O. Pearce
2008-03-10 23:34   ` Jakub Narebski
2008-03-11  7:26     ` Rogan Dawes
2008-03-11  7:50       ` Shawn O. Pearce [this message]
2008-03-11  9:07         ` Rogan Dawes
2008-03-11 12:29           ` Filippo Zangheri

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=20080311075053.GQ8410@spearce.org \
    --to=spearce@spearce.org \
    --cc=filippo.zangheri@yahoo.it \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=lists@dawes.za.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.