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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Michal Sojka <sojkam1@xxxxxxxxxxx>

---
 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)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]