git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t1304: fall back to $USER if $LOGNAME is not defined

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 14, 2011, 18:41 UTC
Message-ID
<7vobxjza9t.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4E98750D.1020106@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
Show 6 quoted lines
> For some reason $LOGNAME is not set anymore for me after an upgrade from
> Ubuntu 11.04 to 11.10.  Use $USER in such a case.
>
> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
> ---
> The only other use of $LOGNAME is in git-cvsimport, which does the same.

While the change to assign $USER to $LOGNAME when the latter is not set is not wrong per-se, I have to wonder (1) why this test should use LOGNAME not USER in the first place, and (2) why you lost LOGNAME.

LOGNAME The system shall initialize this variable at the time of login to be the user's login name. See <pwd.h> . For a value of LOGNAME to be portable across implementations of POSIX.1-2008, the value should be composed of characters from the portable filename character set.

Will apply anyway. Thanks.
Previous: René ScharfeNext: René Scharfe
Message 2 of 3 in “t1304: fall back to $USER if $LOGNAME is not defined”
  1. t1304: fall back to $USER if $LOGNAME is not definedRené Scharfe, Oct 14, 2011
  2. Junio C HamanoOct 14, 2011
  3. René ScharfeOct 14, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.