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

Re: [PATCH v2 2/3] git-core: Support retrieving passwords with GIT_ASKPASS

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Feb 26, 2010, 00:50 UTC
Message-ID
<20100226005020.GR12429@genesis.frugalware.org>
In-Reply-To
<1267143154-5020-1-git-send-email-lznuaa@gmail.com>
On Fri, Feb 26, 2010 at 08:12:34AM +0800, Frank Li <lznuaa@gmail.com> wrote:
Show 10 quoted lines
> +		for (i = 0; i < buffer.len; i++)
> +			if (buffer.buf[i] == '\n' || buffer.buf[i] == '\r') {
> +				buffer.buf[i] = '\0';
> +				buffer.len = i;
> +		}
> +		return strbuf_detach(&buffer, NULL);
> +
> +	} else {
> +		return getpass(prompt);
> +	}
According to Documentation/CodingGuidelines, this would be:
		for (i = 0; i < buffer.len; i++)
			if (buffer.buf[i] == '\n' || buffer.buf[i] == '\r') {
				buffer.buf[i] = '\0';
				buffer.len = i;
			}
		return strbuf_detach(&buffer, NULL);
	} else
		return getpass(prompt);
Previous: Frank LiNext: Frank Li
Message 2 of 8 in “git-core: Support retrieving passwords with GIT_ASKPASS”
  1. 2/3 git-core: Support retrieving passwords with GIT_ASKPASSFrank Li, Feb 26, 2010
  2. Miklos VajnaFeb 26, 2010
  3. Frank LiFeb 26, 2010
  4. Johannes SixtFeb 26, 2010
  5. Junio C HamanoFeb 26, 2010
  6. Johannes SixtFeb 26, 2010
  7. Junio C HamanoFeb 26, 2010
  8. Frank LiFeb 26, 2010

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.