git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [TopGit PATCH] tg-patch: fix invocation in sub working tree directory

From
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date
Mar 17, 2009, 08:02 UTC
Message-ID
<20090317080211.GA21794@pengutronix.de>
In-Reply-To
<1237241299-25515-1-git-send-email-bert.wesarg@googlemail.com>
On Mon, Mar 16, 2009 at 11:08:19PM +0100, Bert Wesarg wrote:
> tg patch won't work in a sub directory of the working tree, because 'git diff
> --name-only' prints the names relative to the top working tree.
Hhhm, that's not exactly the problem.
	git diff --patch-with-stat 45c82b5 t/trivial/typo-kernel -- $path
expects $path to be relative to the top working tree.

IMHO this is a strange behaviour of core git when comparing two trees (and not a tree and the wc). Moreover as the output uses "absolute" paths:

	ukleinek@cassiopeia:~/gsrc/linux-2.6/fs$ git diff --patch-with-stat 45c82b5 t/trivial/typo-kernel -- proc/nommu.c | diffstat -p0
 b/fs/proc/nommu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Best regards Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Previous: Junio C HamanoNext: Uwe Kleine-König
Message 5 of 6 in “tg-patch: fix invocation in sub working tree directory”
  1. tg-patch: fix invocation in sub working tree directoryBert Wesarg, Mar 16, 2009
  2. Junio C HamanoMar 16, 2009
  3. Bert WesargMar 16, 2009
  4. Junio C HamanoMar 17, 2009
  5. Uwe Kleine-KönigMar 17, 2009
  6. Uwe Kleine-KönigMar 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.