git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Sojka <sojkam1@fel.cvut.cz>
To: git@vger.kernel.org
Cc: "Petr Baudis" <pasky@ucw.cz>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Michal Sojka" <sojkam1@fel.cvut.cz>
Subject: [TOPGIT PATCH] Make 'tg patch' work in subdirectories
Date: Tue,  2 Feb 2010 11:31:12 +0100	[thread overview]
Message-ID: <1265106672-18518-1-git-send-email-sojkam1@fel.cvut.cz> (raw)

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)

             reply	other threads:[~2010-02-02 10:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 10:31 Michal Sojka [this message]
2010-02-02 10:55 ` [TOPGIT PATCH] Make 'tg patch' work in subdirectories Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265106672-18518-1-git-send-email-sojkam1@fel.cvut.cz \
    --to=sojkam1@fel.cvut.cz \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).