Commit Diff


commit - 0048f35afa41d388854a0aba3d335e433bb52445
commit + d8d59ea5c6e99332dc7a3ca39d0ff6e74629c903
blob - 85e444dd0708b8ba9b0eb85bc3715cc8d97d2743
blob + 4079f5788bab5a6b19194fc7f89f6c7235a230b6
--- regress/cmdline/common.sh
+++ regress/cmdline/common.sh
@@ -135,10 +135,7 @@ git_show_tree()
 
 trim_obj_id()
 {
-	local trimcount=$1
-	local id=$2
-
-	echo "$id" | sed -E "s/^([0-9a-f]{$trimcount}).*/\1/"
+	expr "$2" : "\([0-9a-f]\{$1\}\)"
 }
 
 pop_idx()