On Mon, Jun 08, 2009 at 09:41:49AM -0700, Junio C Hamano wrote: > We could further uglify the patch like this. > [...] > +git_broken_path_fix () { > + case ":$PATH:" in > + *:$1:*) : ok ;; > + *) > + PATH=$( > + SANE_TOOL_PATH="$1" > + IFS=: path= sep= > + set x $PATH > + shift > + for elem > + do > + case "$SANE_TOOL_PATH:$elem" in > + (?*:/bin | ?*:/usr/bin) > + path="$path$sep$SANE_TOOL_PATH" > + sep=: > + SANE_TOOL_PATH= > + esac > + path="$path$sep$elem" > + sep=: > + done > + echo "$path" > + ) > + ;; > + esac > +} Wow. That _is_ ugly, but it actually addresses exactly both my concern and Brandon's. I kind of like it. -Peff -- 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