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

Re: [PATCH] builtin-branch: be prepared for ref-logging

From
Junio C Hamano <junkio@cox.net>
Date
Feb 3, 2007, 18:55 UTC
Message-ID
<7vzm7v5aw7.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<11705266492308-git-send-email-hjemli@gmail.com>
Lars Hjemli <hjemli@gmail.com> writes:
Show 10 quoted lines
> The test for reflog parameter to create_branch() should also have tested
> for log_all_ref_updates. But there is no good reason not to prepare a
> reflog message, so lets just do it.
>
> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
> ---
>
> If log_all_ref_updates==1 then the reflog will get an empty message with 
> your patch. That is better than using an uninitialized message, but I think
> it's still better to just prepare a proper message.

True, but don't you still need to set log_all_ref_updates while you call write_ref_sha1() for that ref in order to make sure that log_ref_write() sets O_CREAT in oflags?

Previous: Lars HjemliNext: Lars Hjemli
Message 4 of 11 in “fix use of sometimes uninitialized variable 'msg'”
  1. fix use of sometimes uninitialized variable 'msg'Michael Coleman, Feb 3, 2007
  2. fix uninitialized use of msg bufferMichael Coleman, Feb 3, 2007
  3. builtin-branch: be prepared for ref-loggingLars Hjemli, Feb 3, 2007
  4. Junio C HamanoFeb 3, 2007
  5. builtin-branch: be prepared for ref-loggingLars Hjemli, Feb 3, 2007
  6. Junio C HamanoFeb 3, 2007
  7. Lars HjemliFeb 3, 2007
  8. Junio C HamanoFeb 3, 2007
  9. Lars HjemliFeb 3, 2007
  10. Junio C HamanoFeb 3, 2007
  11. Mike ColemanFeb 3, 2007

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.