All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Roundy <droundy@abridgegame.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Git Mailing List <git@vger.kernel.org>, darcs-devel@darcs.net
Subject: Re: Darcs and git: plan of action
Date: Wed, 20 Apr 2005 07:14:52 -0400	[thread overview]
Message-ID: <20050420111446.GE29945@abridgegame.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0504190943060.19286@ppc970.osdl.org>

On Tue, Apr 19, 2005 at 09:49:12AM -0700, Linus Torvalds wrote:
> On Tue, 19 Apr 2005, Tupshin Harper wrote:
> > I suspect that any use of wildcards in a new format would be impossible
> > for darcs since it wouldn't allow darcs to construct dependencies,
> > though I'll leave it to david to respond to that.
> 
> Note that git _does_ very efficiently (and I mean _very_) expose the 
> changed files.
> 
> So if this kind of darcs patch is always the same pattern just repeated
> over <n> files, then you really don't need to even list the files at all.
> Git gives you a very efficient file listing by just doing a "diff-tree"
> (which does not diff the _contents_ - it really just gives you a pretty
> much zero-cost "which files changed" listing).

The catch is that it's possible to have a darcs patch that doesn't change
any files, or that affects files without changing them.  If I rename
function foo to bar, I might want to do

darcs replace foo bar *.c

which would issue a replace on all files, which means that when this patch
is merged with any patches that add occurrences of foo in a file, that will
get modified to a bar, regardless of whether there was previously an
occurrence of foo in that file.

I think we might (when working with git--it would be problematic within
darcs straight) be able to work out some sort of a wildcard replace
scheme, so it could be something like

replace foo bar in: mm/*.c

The regexp bit could be left out, if we restrict the definition of "tokens"
in token replaces--which probably isn't a troublesome limitation.  By
default darcs uses two tokenizing schemes, one which allows "." in tokens
(usually relevant in Makefiles), and one which doesn't, and basically
matches C identifiers.  We could allow for both of these if we had a second
option:

replace filename foo.h bar.h in: mm/*.c

We'd just need to expand the wildcards when translating from the git
repository into darcs patches.

> So that combination would be 100% reliable _if_ you always split up darcs 
> patches to "common elements". 
> 
> And note that there does not have to be a 1:1 relationship between a git
> commit and a darcs patch. For example, say that you have a darcs patch
> that does a combination of "change token x to token y in 100 files" and
> "rename file a into b". I don't know if you do those kind of "combination 
> patches" at all, but if you do, why not just split them up into two? That 
> way the list of files changed _does_ 100% determine the list of files for 
> the token exchange.

We do allow multiple sorts of changes (in darcs terminology, multiple
"primitive patches") in a single patch.

One *could* have multiple git commits for a single darcs patch, but that
seems ugly and I'd rather avoid it.  In my view, revision control system is
more about communication than history (which is why by default, darcs
doesn't "do" history), and grouping changes together is how we express
which changes "go together".  Of course, we could still have a grouping at
a higher level, so that a single "changeset" could consist of multiple git
commits (for example by recognizing that identical commit logs mean that
it's a single change), but that adds a layer of complexity that I'd like to
avoid if possible.
-- 
David Roundy
http://www.darcs.net

  reply	other threads:[~2005-04-20 11:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7ivf6lm594.fsf@lanthane.pps.jussieu.fr>
2005-04-18 12:20 ` Darcs and git: plan of action David Roundy
2005-04-18 15:38   ` Linus Torvalds
2005-04-19 10:42     ` [darcs-devel] " David Roundy
2005-04-19 14:55       ` Linus Torvalds
2005-04-19 16:33         ` [darcs-devel] " Tupshin Harper
2005-04-19 16:49           ` Linus Torvalds
2005-04-20 11:14             ` David Roundy [this message]
2005-04-18 18:35   ` Ray Lee
2005-04-19  0:55   ` Juliusz Chroboczek
2005-04-19  1:43     ` [darcs-devel] " Ray Lee
2005-04-19  8:22       ` Juliusz Chroboczek
2005-04-20  1:22         ` Ray Lee
2005-04-19 11:04     ` David Roundy
2005-04-19 12:20       ` Juliusz Chroboczek
2005-04-19 12:25         ` [darcs-devel] " Petr Baudis
2005-04-20 11:18           ` David Roundy
2005-04-20 11:29         ` David Roundy
2005-04-18 21:04 linux
2005-04-19  0:07 ` Ray Lee
2005-04-19  1:05   ` Kevin Smith
2005-04-19  1:42     ` Ray Lee
2005-04-19  2:05       ` Kevin Smith
2005-04-19 22:40         ` Ray Lee
2005-04-19 23:00           ` Tupshin Harper
2005-04-19 23:21             ` Ray Lee
2005-04-19 23:38               ` Tupshin Harper
2005-04-19 23:03           ` [darcs-devel] " Kevin Smith
2005-04-19 23:06             ` Ray Lee
2005-04-19 23:32               ` Tupshin Harper

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=20050420111446.GE29945@abridgegame.org \
    --to=droundy@abridgegame.org \
    --cc=darcs-devel@darcs.net \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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.