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

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 15, 2018, 17:20 UTC
Message-ID
<xmqqtvnvim2j.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CACsJy8B3ip+_sDrpvaZ32a35-6hWkY=eE6g4RObWgbHnf6g8uw@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 10 quoted lines
> On Wed, Aug 15, 2018 at 6:48 PM Elijah Newren <newren@gmail.com> wrote:
>>
>> On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
>>
>> The patch looks good, but since this touches multiple .c files, I
>> think I'd s/branch.c/branch/ in the subject line.
>
> It is about removing the_repository from branch.c though. As much as I
> want to completely erase the_repository, that would take a lot more
> work.

I do not think this is about removing the_repository from branch.c; it is primarily about allowing create_branch() to work on an arbitrary repository instance.

I also do not think remove_branch_state() function belongs to branch.c in the first place. The state it is clearing is not even about a "branch". It is state left by the last command that stopped in the middle; its only callers are "reset", "am --abort/--skip" and "checkout <another-branch>".

Previous: Duy NguyenNext: Duy Nguyen
Message 17 of 18 in “branch.c: remove explicit reference to the_repository”
  1. 1/2 branch.c: remove explicit reference to the_repositoryNguyễn Thái Ngọc Duy, Aug 15, 2018
  2. 2/2 cherry-pick: fix --quit not deleting CHERRY_PICK_HEADNguyễn Thái Ngọc Duy, Aug 15, 2018
  3. Stefan BellerAug 15, 2018
  4. Duy NguyenAug 15, 2018
  5. Stefan BellerAug 15, 2018
  6. Junio C HamanoAug 15, 2018
  7. Duy NguyenAug 15, 2018
  8. Junio C HamanoAug 15, 2018
  9. cherry-pick: fix --quit not deleting CHERRY_PICK_HEADNguyễn Thái Ngọc Duy, Aug 16, 2018
  10. Junio C HamanoAug 16, 2018
  11. Elijah NewrenAug 15, 2018
  12. Duy NguyenAug 15, 2018
  13. Stefan BellerAug 15, 2018
  14. Duy NguyenAug 15, 2018
  15. Junio C HamanoAug 15, 2018
  16. Duy NguyenAug 15, 2018
  17. Junio C HamanoAug 15, 2018
  18. Duy NguyenAug 15, 2018

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.