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

Re: [PATCH v2 2/6] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

From
David Turner <dturner@twopensource.com>
Date
Jun 25, 2015, 22:29 UTC
Message-ID
<1435271365.7900.16.camel@twopensource.com>
In-Reply-To
<xmqqsi9fwl0i.fsf@gitster.dls.corp.google.com>
On Thu, 2015-06-25 at 14:11 -0700, Junio C Hamano wrote:
Show 16 quoted lines
> David Turner <dturner@twopensource.com> writes:
> 
> > Instead of directly writing to and reading from files in
> > $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD
> > and REVERT_HEAD.
> >
> > Signed-off-by: David Turner <dturner@twopensource.com>
> > ---
> 
> I may have said this already in the last round, but I cannot shake
> off the feeling that this patch is doing two completely unrelated
> things at once.
> 
> The change to refs.c that introduced the should_autocreate_reflog()
> helper (which is a good idea even without any other changes in this
> patch) 
I'll break that out into a separate patch when I reroll.
> and then using that to commit_ref_update() does not have
> anything to do with CHERRY_PICK_HEAD/REVERT_HEAD, does it?

I had thought that it did, but some testing shows that it does not (or at least does not yet). The original series of patches was assembled out of a long process of making the test suite pass with the alternate ref backend. I expect that as I rewrite that series, I'll either figure out what issues these change solved, or remove them. In this case, I'll split the patch.

>  * commit_ref_update() gained a new "flags" parameter, but it does
>    not seem to be used at all.  Why?
cruft, will remove.
Previous: Junio C HamanoNext: David Turner
Message 4 of 14 in “refs.c: add err arguments to reflog functions”
  1. 1/6 refs.c: add err arguments to reflog functionsDavid Turner, Jun 25, 2015
  2. 2/6 cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refsDavid Turner, Jun 25, 2015
  3. Junio C HamanoJun 25, 2015
  4. David TurnerJun 25, 2015
  5. 3/6 bisect: use refs infrastructure for BISECT_STARTDavid Turner, Jun 25, 2015
  6. Junio C HamanoJun 25, 2015
  7. David TurnerJun 25, 2015
  8. David TurnerJun 26, 2015
  9. 4/6 refs: add safe_create_reflog functionDavid Turner, Jun 25, 2015
  10. Junio C HamanoJun 25, 2015
  11. 5/6 git-reflog: add create and exists functionsDavid Turner, Jun 25, 2015
  12. Junio C HamanoJun 25, 2015
  13. David TurnerJun 25, 2015
  14. 6/6 git-stash: use git-reflog instead of creating filesDavid Turner, Jun 25, 2015

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.