Skip to content

Commit

Permalink
build: support readonly source tree
Browse files Browse the repository at this point in the history
Signed-off-by: He Xian <[email protected]>
  • Loading branch information
hexian000 committed Sep 27, 2024
1 parent ab57078 commit 63b0985
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ if git rev-parse --git-dir >/dev/null 2>&1; then
if [ -z "${VERSION}" ]; then
VERSION="git-$(git rev-parse --short HEAD)"
fi
git update-index --refresh -q
if ! git diff-index --quiet HEAD --; then
if ! git diff --quiet HEAD --; then
VERSION="${VERSION}+"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion v2/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (h *apiStatsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if t.NumSessions > 0 {
s = fmt.Sprintf("%d (%d streams)", t.NumSessions, t.NumStreams)
}
fprintf(w, "%-20q: %s, %s\n", t.Name, t.LastChanged.Format(time.RFC3339), s)
fprintf(w, "%-20q: %s %s\n", t.Name, t.LastChanged.Format(time.RFC3339), s)
} else {
fprintf(w, "%-20q: never seen\n", t.Name)
}
Expand Down

0 comments on commit 63b0985

Please sign in to comment.