From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Bert Wesarg <bert.wesarg@googlemail.com>
Cc: Petr Baudis <pasky@suse.cz>,
git@vger.kernel.org, martin f krafft <madduck@debian.org>
Subject: Re: [TopGit PATCH] tg-patch: fix invocation in sub working tree directory
Date: Tue, 17 Mar 2009 09:33:26 +0100 [thread overview]
Message-ID: <20090317083326.GA22384@pengutronix.de> (raw)
In-Reply-To: <1237241299-25515-1-git-send-email-bert.wesarg@googlemail.com>
Hello again,
On Mon, Mar 16, 2009 at 11:08:19PM +0100, Bert Wesarg wrote:
> --- a/tg-patch.sh
> +++ b/tg-patch.sh
> @@ -50,13 +50,18 @@ cat_file "$topic:.topmsg"
> echo
> [ -n "$(git grep $diff_opts '^[-]--' ${diff_committed_only:+"$name"} -- ".topmsg")" ] || echo '---'
>
> +# if we are in a sub working tree dir, we need to prefix all file names from
> +# git diff --name-only with this cdup
> +cdup=$(git rev-parse --show-cdup)
> +
> # Evil obnoxious hack to work around the lack of git diff --exclude
> git_is_stupid="$(mktemp -t tg-patch-changes.XXXXXX)"
> 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
> - cat "$git_is_stupid" | xargs git diff --patch-with-stat $diff_opts "$base_rev" ${diff_committed_only:+"$name"} --
> + sed -e "s#^#$cdup#" "$git_is_stupid" |
> + xargs git diff --patch-with-stat $diff_opts "$base_rev" ${diff_committed_only:+"$name"} --
My not move pretty_tree from tg-export.sh to tg.sh and use that.
i.e.
git diff $someopts "$(pretty_tree "$base_rev")" "$(pretty_tree "...")"
then we wouldn't need that git_is_stupid-hack and the relative path name
thinggy wouldn hurt us.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
prev parent reply other threads:[~2009-03-17 8:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-16 22:08 [TopGit PATCH] tg-patch: fix invocation in sub working tree directory Bert Wesarg
2009-03-16 22:33 ` Junio C Hamano
2009-03-16 23:25 ` Bert Wesarg
2009-03-17 0:24 ` Junio C Hamano
2009-03-17 8:02 ` Uwe Kleine-König
2009-03-17 8:33 ` Uwe Kleine-König [this message]
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=20090317083326.GA22384@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=madduck@debian.org \
--cc=pasky@suse.cz \
/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).