Skip to content

Commit b705b63

Browse files
committed
user-info: Sort alphabetically, fixes unit test
1 parent 8812837 commit b705b63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/git-shell-commands/user-info

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ _list_access() {
3939
echo "User '$USER' has $NAMED_ACCESS_MODE access to:"
4040
find . -type f -name "$FILE_NAME" -exec \
4141
grep -xq "^$USER$" '{}' \; -exec \
42-
dirname -- '{}' \; | \
42+
dirname -- '{}' \; | \
43+
LC_ALL=C sort | \
4344
while read -r LINE; do
4445
REPO=$(echo "$LINE" | cut -c 3-)
4546
echo " $REPO"

test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ user_delete "/" "$INVALID_USER_NAME_ERROR_MSG"
307307
user_delete "=" "$INVALID_USER_NAME_ERROR_MSG"
308308
users_list_count_must_equal "2"
309309

310-
# TODO(leon): Fix this test
311310
user_info "$USER_NAME" "User '$USER_NAME' has read access to:
312311
$USER_NAME/test2
313312
$USER_NAME/test3

0 commit comments

Comments
 (0)