threads / patch / 22483

patchMake 'tg patch' work in subdirectories

Subject: [TOPGIT PATCH] Make 'tg patch' work in subdirectories

## tl;dr

2 messages between Feb 2, 2010 and Feb 2, 2010. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Michal Sojka· Feb 2, 2010, 10:31 UTC · lore

When 'tg patch' is called from a subdirectory, it outputs only the commit message and no diff.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
---
 tg-patch.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Show changes to tg-patch.sh +1 −0
diff --git a/tg-patch.sh b/tg-patch.sh
index d701c54..f703a87 100644
--- a/tg-patch.sh
+++ b/tg-patch.sh
@@ -56,6 +56,7 @@ git diff --name-only $diff_opts "$base_rev" ${diff_committed_only:+"$name"} -- |
 	fgrep -vx ".topdeps" |
 	fgrep -vx ".topmsg" >"$git_is_stupid" || : # fgrep likes to fail randomly?
 if [ -s "$git_is_stupid" ]; then
+	cd "$root_dir"
 	cat "$git_is_stupid" | xargs git diff --patch-with-stat $diff_opts "$base_rev" ${diff_committed_only:+"$name"} --
 else
 	echo "No changes."
-- 
tg: (341a371..) t/make-patch-work-in-subdir (depends on: master)
Uwe Kleine-König· Feb 2, 2010, 10:55 UTC · re: Michal Sojka · lore

Re: [TOPGIT PATCH] Make 'tg patch' work in subdirectories

Hello Michal,
On Tue, Feb 02, 2010 at 11:31:12AM +0100, Michal Sojka wrote:
> When 'tg patch' is called from a subdirectory, it outputs only the
> commit message and no diff.
Thanks
Uwe
-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

← back to recent threads