git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 'git diff' against files outside a git repo
@ 2010-09-24 22:23 Avery Pennarun
  2010-09-24 22:30 ` Elijah Newren
  2010-09-24 22:30 ` Brandon Casey
  0 siblings, 2 replies; 7+ messages in thread
From: Avery Pennarun @ 2010-09-24 22:23 UTC (permalink / raw)
  To: Git Mailing List

Hi all,

I'm interested in using 'git diff' on some files that aren't actually
inside a git repo at all.  Specifically, the --color-words and
--word-diff-regex are really cool and I happen to have a use for them
on files that aren't stored verbatim in git.  As a whole, git's
implementation of diff seems to be the fastest-moving one out there,
so I'd rather use it instead of another random diff implementation.

(For the curious: the particular "files" I want to compare are
actually split into a hierarchical tree of blobs using bup's rolling
checksum and *then* stored in git.  Obviously I have to reassemble
them before I can diff them, which is fine and easy, but I then want
to run 'git diff' against them, which seems to not be so easy.)

(For the extremely curious: the particular files I want to diff are
mega-gigantic csv files from database dumps.  Because of bup's tree
format, I should be able to zoom in on just the overall part of the
file that has changed, then diff only that, which will be much faster
than running a diff algorithm against the whole file.  Essentially
O(log n) vs. the file size.)

Is there already a way to get 'git diff' to do this?

If not, would it be sensible to extend git-diff to do comparison
between two outside files?

Or should I stop trying to do this and use some other diff
implementation instead?

Another alternative would be to teach git directly how to act on
bup-style large objects, but that's... a lot of work.  And it's not
obvious that a patch to do so would be accepted anyhow, since
bup-style storage is necessarily not as space-efficient and is harder
to deltify.

Thanks,

Avery

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-27  7:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-24 22:23 'git diff' against files outside a git repo Avery Pennarun
2010-09-24 22:30 ` Elijah Newren
2010-09-25  7:45   ` Avery Pennarun
2010-09-26  7:13     ` Junio C Hamano
2010-09-26  9:38       ` Avery Pennarun
2010-09-27  7:38         ` Michael J Gruber
2010-09-24 22:30 ` Brandon Casey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).