Am 10/18/2012 0:09, schrieb Jeff King:
> -     lid="$(echo "$1" | tr "[A-Z]" "[a-z]")"
> -     uid="$(echo "$1" | tr "[a-z]" "[A-Z]")"
> +     lid="$(echo "$1" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ 
> abcdefghijklmnopqrstuvwxyz)"
> +     uid="$(echo "$1" | tr abcdefghijklmnopqrstuvwxyz 
> ABCDEFGHIJKLMNOPQRSTUVWXYZ)"
> 
> That seems like crazy overkill, but it at least will let us double-check
> that the tr sequences are the problem.

Right. But we should really be doing something like this instead to save a
few subprocesses.

-- Hannes

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 178e453..018e56e 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -68,8 +68,8 @@ eval "$functions"
 # "author" or "committer

 set_ident () {
-       lid="$(echo "$1" | tr "[A-Z]" "[a-z]")"
-       uid="$(echo "$1" | tr "[a-z]" "[A-Z]")"
+       uid=$1
+       lid=$2
        pick_id_script='
                /^'$lid' /{
                        s/'\''/'\''\\'\'\''/g
@@ -320,9 +320,9 @@ while read commit parents; do
        git cat-file commit "$commit" >../commit ||
                die "Cannot read commit $commit"

-       eval "$(set_ident AUTHOR <../commit)" ||
+       eval "$(set_ident AUTHOR author <../commit)" ||
                die "setting author failed for commit $commit"
-       eval "$(set_ident COMMITTER <../commit)" ||
+       eval "$(set_ident COMMITTER committer <../commit)" ||
                die "setting committer failed for commit $commit"
        eval "$filter_env" < /dev/null ||
                die "env filter failed: $filter_env"
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to