Command to get username used by git-lfs lock?

Viewed 372

I have a repo in which I am using git-lfs for file locking only (I'm not tracking any files). The remote host is our on-prem GitLab server. When a file is locked with 'git lfs lock' the lock owner's username is, I believe, provided by the GitLab server. This could be different to my Linux username or indeed my git config username, e.g.

$ whoami
jbloggs
$ git config user.name
Joe
$ git lfs locks --path=file.txt
file.txt    Joe Bloggs ID:1

For a bash script I'm writing I want to be able to marry up these three usernames and effectively treat them as one. Is there a way from the command line of getting a user's lfs lock username (without having to, for example, temporarily lock a file and run git lfs locks and grab the owner name from the output)?

0 Answers
Related