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

Re: [PATCH 2/3] send-pack: fix push nego. when remote has refs

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Jul 14, 2021, 19:33 UTC
Message-ID
<20210714193359.4083725-1-jonathantanmy@google.com>
In-Reply-To
<YO4UIGQPugvHcYrw@google.com>
Show 11 quoted lines
> On Wed, Jun 23, 2021 at 03:30:52PM -0700, Jonathan Tan wrote:
> > 
> > Commit 477673d6f3 ("send-pack: support push negotiation", 2021-05-05)
> > did not test the case in which a remote advertises at least one ref. In
> > such a case, "remote_refs" in get_commons_through_negotiation() in
> > send-pack.c would also contain those refs with a zero ref->new_oid (in
> > addition to the refs being pushed with a nonzero ref->new_oid). Passing
> > them as negotiation tips to "git fetch" causes an error, so filter them
> > out.
> 
> So here we are filtering those redundant refs on the client side?
Yes, but I don't know what you mean by "redundant".
Show 9 quoted lines
> > @@ -210,6 +211,7 @@ test_expect_success 'push with negotiation' '
> >  	rm event &&
> >  	mk_empty testrepo &&
> >  	git push testrepo $the_first_commit:refs/remotes/origin/first_commit &&
> > +	test_commit -C testrepo unrelated_commit &&
> 
> So now we are asking 'testrepo' to initially advertise that it also has
> unrelated_commit, which we don't care about, and expect to work fine
> anyway. Ok.
Yes.
> Seems reasonable enough to me.
> Reviewed-by: Emily Shaffer <emilyshaffer@google.com>
Thanks.
Previous: Emily ShafferNext: Jonathan Tan
Message 4 of 24 in “Push negotiation fixes”
  1. 0/3 Push negotiation fixesJonathan Tan, Jun 23, 2021
  2. 2/3 send-pack: fix push nego. when remote has refsJonathan Tan, Jun 23, 2021
  3. Emily ShafferJul 13, 2021
  4. Jonathan TanJul 14, 2021
  5. 1/3 send-pack: fix push.negotiate with remote helperJonathan Tan, Jun 23, 2021
  6. Emily ShafferJul 13, 2021
  7. Jonathan TanJul 14, 2021
  8. Ævar Arnfjörð BjarmasonJul 13, 2021
  9. Jonathan TanJul 14, 2021
  10. Ævar Arnfjörð BjarmasonJul 14, 2021
  11. 3/3 fetch: die on invalid --negotiation-tip hashJonathan Tan, Jun 23, 2021
  12. Emily ShafferJul 13, 2021
  13. Ævar Arnfjörð BjarmasonJul 13, 2021
  14. Jonathan TanJul 14, 2021
  15. Ævar Arnfjörð BjarmasonJul 14, 2021
  16. 0/3 Push negotiation fixesJonathan Tan, Jul 15, 2021
  17. 1/3 send-pack: fix push.negotiate with remote helperJonathan Tan, Jul 15, 2021
  18. Ævar Arnfjörð BjarmasonJul 27, 2021
  19. 2/3 send-pack: fix push nego. when remote has refsJonathan Tan, Jul 15, 2021
  20. Ævar Arnfjörð BjarmasonJul 27, 2021
  21. Jeff KingJul 27, 2021
  22. Jonathan TanJul 27, 2021
  23. 3/3 fetch: die on invalid --negotiation-tip hashJonathan Tan, Jul 15, 2021
  24. Junio C HamanoJul 15, 2021

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.