From: Johannes Sixt <j6t@kdbg.org>
To: Dave Zarzycki <zarzycki@apple.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCHv2] Make filter-branch work with many branches
Date: Wed, 20 Jul 2011 18:42:33 +0200 [thread overview]
Message-ID: <4E270579.7060309@kdbg.org> (raw)
In-Reply-To: <CA809344-F7C2-4A41-B4F7-15B5EEB9B7E2@apple.com>
Am 20.07.2011 15:42, schrieb Dave Zarzycki:
> -rev_args=$(git rev-parse --revs-only "$@")
> +rev_parse_args="$@"
This won't do what you expect when "$@" should expand to more than one
word.
I meant something like the following. Warning: Completely untested.
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 962a93b..d0a933e 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -274,7 +274,7 @@ else
remap_to_ancestor=t
fi
-rev_args=$(git rev-parse --revs-only "$@")
+git rev-parse --revs-only "$@" >../revargs || exit
case "$filter_subdir" in
"")
@@ -287,7 +287,7 @@ case "$filter_subdir" in
esac
git rev-list --reverse --topo-order --default HEAD \
- --parents --simplify-merges $rev_args "$@" > ../revs ||
+ --parents --simplify-merges --stdin "$@" <../revargs >../revs ||
die "Could not get the commits"
commits=$(wc -l <../revs | tr -d " ")
prev parent reply other threads:[~2011-07-20 16:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 13:42 [PATCHv2] Make filter-branch work with many branches Dave Zarzycki
2011-07-20 16:42 ` Johannes Sixt [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=4E270579.7060309@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=zarzycki@apple.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.