diff --relative: output paths as relative to the current subdirectory
[gitweb.git] / git-instaweb.sh
index ad0723ccc64cc2cb7d0e79a165a68707d3ddfde7..3e4452bc4bc1fe57c75848ccd9c073aeb065a980 100755 (executable)
@@ -274,6 +274,14 @@ webrick)
        ;;
 esac
 
+init_browser_path() {
+       browser_path="`git config browser.$1.path`"
+       test -z "$browser_path" && browser_path="$1"
+}
+
 start_httpd
 url=http://127.0.0.1:$port
-test -n "$browser" && "$browser" $url || echo $url
+test -n "$browser" && {
+       init_browser_path "$browser"
+       "$browser_path" $url
+} || echo $url