git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Parsing diff --git lines
@ 2008-03-09  1:48 Simon Fraser
  2008-03-09  4:04 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Fraser @ 2008-03-09  1:48 UTC (permalink / raw)
  To: git

I'm working on a GUI for git, and I'd like to be able to provide
some diff navigation tools. That requires that I can find the
file chunks in a diff, and parse out the file names.

However, I don't see a reliable way to identify the two files
from a "diff --git" line. Here's a (deliberately pathological)
example:

diff --git a/a / b/file with spaces.txt b/a / b/file with spaces.txt

In this case, the repository contains directories called "a " and
" b" and the file names have spaces in.

What would make this possible would be either to always quote
file paths containing spaces, or use a character other than
a space (e.g. a \t) between the two file names.

Thanks
Simon


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

end of thread, other threads:[~2008-03-09 20:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-09  1:48 Parsing diff --git lines Simon Fraser
2008-03-09  4:04 ` Linus Torvalds
2008-03-09  8:25   ` Jakub Narebski
2008-03-09 20:45     ` Johannes Schindelin

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).