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

Re: [PATCH 05/11] Add a library function to add an alternate to the alternates file

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 8, 2008, 23:18 UTC
Message-ID
<alpine.LSU.1.00.0803090017150.3975@racer.site>
In-Reply-To
<alpine.LNX.1.00.0803081804090.19665@iabervon.org>
Hi,
On Sat, 8 Mar 2008, Daniel Barkalow wrote:
Show 10 quoted lines
> +void add_to_alternates_file(const char *reference)
> +{
> +	char *file;
> +	char *alt;
> +	int fd;
> +
> +	file = mkpath("%s/objects/info/alternates", get_git_dir());
> +	fd = open(file, O_CREAT | O_WRONLY | O_APPEND, 0666);
> +	if (fd < 0)
> +		die("failed to create %s", file);

Even with alternates, which are probably written only rarely, I would have expected a lockfile procedure (if only to be consistent with the rest).

Ciao, Dscho

Previous: Daniel BarkalowNext: Daniel Barkalow
Message 2 of 3 in “Add a library function to add an alternate to the alternates file”
  1. 05/11 Add a library function to add an alternate to the alternates fileDaniel Barkalow, Mar 8, 2008
  2. Johannes SchindelinMar 8, 2008
  3. Daniel BarkalowMar 8, 2008

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.