Filtering commits by author, unexpected results

Hello!

I’ve noticed something fairly odd when trying to search for commits for a specific user.
If I view all recent commits unfiltered, I can see the user’s commits just fine. However, If I try to filter by ‘Author’ for said user, I get no results. Even though the user has 100% made commits.

This isn’t the case for all users, It only appears to happen for users who have accents in their names. After some digging, a colleague found a workaround by altering the URL to include the user’s email address instead of their name. See below for an example.

https://gitlab.daltonmaag.com/damatype/venn-vf/-/commits/master?author=FirstName%20LastName

Yields no results. However,

https://gitlab.daltonmaag.com/damatype/venn-vf/-/commits/master?author=FirstName.LastName@domain.com

Returns the commits.

We use LDAP to authenticate our users, and the problematic users in question have accents in their Display Names in AD. Whether this has anything to do with it, I’m not entirely sure. Additionally, their .gitconfig looks like:

We deploy the .gitconfigs through GPO using the following script:

REM Get Users full name
FOR /F "tokens=1 delims=" %%A in ('net user "%USERNAME%" /domain ^| FIND /I "Full Name"') do SET fullNameText=%%A
set fullName=%fullNameText:Full Name=%
for /f "tokens=* delims= " %%a in ("%fullName%") do set fullName=%%a
REM Setup the .gitconfig file in the users profile folder
IF NOT EXIST "%USERPROFILE%\.gitconfig.override" (
	IF EXIST "%USERPROFILE%\.gitconfig" move %USERPROFILE%\.gitconfig %USERPROFILE%\.gitconfig.old
	REM Create .gitconfig file
	echo [user] > %USERPROFILE%\.gitconfig
	echo 	name = %fullName% >> %USERPROFILE%\.gitconfig
	echo 	email = %username%@domain.com >> %USERPROFILE%\.gitconfig
	echo [core] >> %USERPROFILE%\.gitconfig
	echo 	editor = 'C:\\Program Files\\Microsoft VS Code\\code.exe' --wait >> %USERPROFILE%\.gitconfig
	echo [push] >> %USERPROFILE%\.gitconfig
	echo 	default = simple >> %USERPROFILE%\.gitconfig
	echo [alias] >> %USERPROFILE%\.gitconfig
	echo 	lol=log --graph --decorate --oneline >> %USERPROFILE%\.gitconfig
	REM Copy .gitconfig to homedrive
	copy %USERPROFILE%\.gitconfig %HOMEDRIVE%\.gitconfig
)
REM In case .gitconfig is overriden
IF EXIST "%USERPROFILE%\.gitconfig.override" (
	copy %USERPROFILE%\.gitconfig.override %USERPROFILE%\.gitconfig
	copy %USERPROFILE%\.gitconfig %HOMEDRIVE%\.gitconfig

Again, whether the accents have anything to do with it, I’m not sure. But, I’ve tested 3-4 users who also have accents and It’s the same deal.

We’re running version 13.9.

Please let me know if I’ve missed out on anything.

1 Like

bumpbump

@jb_dama thanks for the hint!

I was falling into the same trap, a user setup his local gitconfig with “lastname firstname” vs. “firstname lastname”. Gitlab creates the search-string in the web frontend from database I guess…

Turns out in version v16.9.1 this is still a issue. I feel using author_email should be superior to the current implementation. Email should be unique.

I was not able to reproduce your search for e-mail, maybe this was changed through versions.

A simple
?author_email=mail%40domain.tld also does not work :frowning: