Jens Lehmann <Jens.Lehmann@xxxxxx> writes: > The first version was whitespace damaged, please use this instead. Thanks. This one looks somewhat iffy (1/2 looked perfectly fine, though). > + a=$(cd "$gitdir" && pwd) > + b=$(cd "$path" && pwd) > + while [ "$b" ] && [ "${a%%/*}" = "${b%%/*}" ] > + do > + a=${a#*/} b=${b#*/}; > + done > + rel=$(echo $a | sed -e 's|[^/]*|..|g') > + (clear_local_git_env; cd "$path" && git config core.worktree "$rel/$b") > } The style ([ "$b" ] vs "test -n "$b") aside, it strikes me odd that you only check $b; it is unclear what guarantees that "$a" is always longer. Maybe there is a reason but then a one-line comment here would not hurt? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html