Re: [PATCH v2] Do not show "diff --git" metainfo with --no-prefix

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: Daniel Barkalow <barkalow@...>, Linus Torvalds <torvalds@...>, Chris Ortman <chrisortman@...>, <git@...>
Date: Wednesday, January 16, 2008 - 10:28 pm

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:


My point was that the validness you mentined above is a
happenstance, and not a result of a good design.

After I move gitk-git one level down to modules/gitk but before
making it as a submodule, the output with --no-prefix will say
"diff --git modules/gitk/gitk modules/gitk/gitk", and that will
not be a suitable diff for Paul to apply to his tree.

I think he needs "-p2", but then he can already do that to diffs
produced without using your --no-prefix that talks about "diff
--git a/gitk-git/gitk b/gitk-git/gitk".  IOW, --no-prefix is not
a solution to anything.

And that is why I keep calling your "--no-prefix happens to work
if you are only talking about a project that is subtree-merged
one level down" argument a _hack_.

If we were to do this properly in "git diff", we would:

 - introduce a separate --strip-paths=1 (or whatever number of
   levels of leading prefix);

 - not use --{src,dst,no}-prefix

and you would do:

	$ git diff --strip-paths=1 gitk-git

in the current tree, which would first strip one path component
and then do the usual opt->a_prefix/b_prefix thing to show:

	diff --git a/gitk b/gitk

Similarly you would run:

        $ git diff --strip-paths=2 modules/gitk

after I move gitk-git down one level.

An alternative would be to use the jc/diff-relative topic
currently parked in 'offcuts' branch, and run:

	$ cd gitk-git && git diff .

or

	$ cd modules/gitk && git diff .

which would give diffs in relative paths.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[FEATURE REQUEST] git-svn format-patch, Chris Ortman, (Tue Jan 15, 9:59 am)
Re: [FEATURE REQUEST] git-svn format-patch, Jean-Luc Herren, (Tue Jan 15, 4:14 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Chris Ortman, (Tue Jan 15, 4:30 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Daniel Barkalow, (Tue Jan 15, 10:20 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Nigel Magnay, (Tue Mar 11, 1:38 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Daniel Barkalow, (Wed Mar 12, 12:38 am)
Re: [FEATURE REQUEST] git-svn format-patch, Jan Hudec, (Tue Mar 11, 3:22 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Johannes Schindelin, (Tue Jan 15, 10:45 am)
Re: [FEATURE REQUEST] git-svn format-patch, Chris Ortman, (Tue Jan 15, 11:58 am)
Re: [FEATURE REQUEST] git-svn format-patch, Daniel Barkalow, (Tue Jan 15, 7:11 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Chris Ortman, (Tue Jan 15, 10:01 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Junio C Hamano, (Tue Jan 15, 8:19 pm)
Re: [PATCH v2] Do not show "diff --git" metainfo with --no-p..., Johannes Schindelin, (Wed Jan 16, 9:11 pm)
Re: [PATCH v2] Do not show "diff --git" metainfo with --no-p..., Johannes Schindelin, (Wed Jan 16, 9:48 pm)
Re: [PATCH v2] Do not show "diff --git" metainfo with --no-p..., Johannes Schindelin, (Thu Jan 17, 11:12 am)
Re: [PATCH v2] Do not show "diff --git" metainfo with --no-p..., Johannes Schindelin, (Wed Jan 16, 10:45 pm)
Re: [PATCH v2] Do not show "diff --git" metainfo with --no-p..., Johannes Schindelin, (Wed Jan 16, 9:54 pm)
Re: [PATCH v2] Do not show "diff --git" metainfo with --no-p..., Junio C Hamano, (Wed Jan 16, 10:28 pm)
Re: [PATCH/RFC] Do not show "diff --git" metainfo with --no-..., Johannes Schindelin, (Tue Jan 15, 9:37 pm)
Re: [PATCH/RFC] Do not show "diff --git" metainfo with --no-..., Johannes Schindelin, (Tue Jan 15, 9:53 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Pascal Obry, (Tue Jan 15, 1:10 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Johannes Schindelin, (Tue Jan 15, 12:13 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Chris Ortman, (Tue Jan 15, 12:23 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Johannes Schindelin, (Tue Jan 15, 12:52 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Chris Ortman, (Tue Jan 15, 1:07 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Johannes Schindelin, (Tue Jan 15, 1:11 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Chris Ortman, (Tue Jan 15, 3:04 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Jan Hudec, (Tue Jan 15, 4:15 pm)
Re: [FEATURE REQUEST] git-svn format-patch, Miles Bader, (Wed Jan 16, 2:41 am)
Re: [FEATURE REQUEST] git-svn format-patch, Shawn O. Pearce, (Wed Jan 16, 2:54 am)