git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TOPGIT PATCH] Make 'tg patch' work in subdirectories
@ 2010-02-02 10:31 Michal Sojka
  2010-02-02 10:55 ` Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Sojka @ 2010-02-02 10:31 UTC (permalink / raw)
  To: git; +Cc: Petr Baudis, Uwe Kleine-König, Michal Sojka

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

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)

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

end of thread, other threads:[~2010-02-02 10:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02 10:31 [TOPGIT PATCH] Make 'tg patch' work in subdirectories Michal Sojka
2010-02-02 10:55 ` Uwe Kleine-König

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