Code

Merge branch 'jk/renamelimit' (early part)
[git.git] / t / t6000lib.sh
index d548bf8026289f1d590ecd0e0b7ec883650c4d78..c0baaa536079b1213d83bbf234ac688567c95237 100755 (executable)
@@ -17,7 +17,7 @@ unique_commit()
        _text=$1
         _tree=$2
        shift 2
-       echo $_text | git-commit-tree $(tag $_tree) "$@"
+       echo $_text | git commit-tree $(tag $_tree) "$@"
 }
 
 # Save the output of a command into the tag specified. Prepend
@@ -62,7 +62,7 @@ as_author()
 commit_date()
 {
         _commit=$1
-       git-cat-file commit $_commit | sed -n "s/^committer .*> \([0-9]*\) .*/\1/p"
+       git cat-file commit $_commit | sed -n "s/^committer .*> \([0-9]*\) .*/\1/p"
 }
 
 on_committer_date()
@@ -97,7 +97,13 @@ check_output()
 # from front and back.
 name_from_description()
 {
-        tr "'" '-' | tr '~`!@#$%^&*()_+={}[]|\;:"<>,/? ' '-' | tr -s '-' | tr '[A-Z]' '[a-z]' | sed "s/^-*//;s/-*\$//"
+       perl -pe '
+               s/[^A-Za-z0-9.]/-/g;
+               s/-+/-/g;
+               s/-$//;
+               s/^-//;
+               y/A-Z/a-z/;
+       '
 }