{"thread":{"id":"60596","subject":"getting git send-email patches from someone who is behind","startedAt":"2023-12-08T17:50:36Z","lastAt":"2023-12-08T18:57:36Z","messageCount":3,"participants":["Sandra Snan","Konstantin Ryabitsev"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"485473","messageId":"87h6ksk2hk.fsf@ellen.idiomdrottning.org","threadId":"60596","inReplyTo":null,"subject":"getting git send-email patches from someone who is behind","fromName":"Sandra Snan","fromEmail":"sandra.snan@idiomdrottning.org","sentAt":"2023-12-08T17:50:31Z","receivedAt":"2023-12-08T17:50:36Z","isPatch":false,"sender":{"key":"sandra.snan@idiomdrottning.org","avatar":"https://gravatar.com/avatar/9f3cf671ef175db9ce2f833436f4f63b58f54651b1208ef07e63ee7443e86e82?d=mp&s=160"},"body":"I have a li'l git send-email question. Someone sent me a patch set \nof six patches today but they were not on most current main. I had \nto guess what version they were sending to so I could git am when \nI was on that particular version. I managed to sort it all out so \nthis question is more for future reference.\n\nIsn't there a way inside of the emails that it can show what \nversion to apply the patches to?\n\nBecause now I was like \"OK, I remember talking to them the other \nday and that means they probably are on what for me is HEAD^^\" and \nthat turned out to be correct, and sorting out the conflicts was \nalso easy enough,\nbut if I hadn't talked to them beforehand I would've been \ncompletely lost.\n\nI asked another friend about it and he said:\n\n> it's possible to record the base commit: \n> https://git-scm.com/docs/git-format-patch#_base_tree_information\n> however, it's a bit finicky to do with git-send-email\n\nI dunno.\n\nI get that one of the fun parts about using patches instead of PRs \nis\nthat you can be a li'l more loosey goosey about exactly what \ncommit\nsomething is supposed to belong to but here I would've been \ncompletely\nlost because the patchset just borked horribly right from the \nfirst patch.\n\nIf others have run into this, what's the solution?\n"},{"id":"485476","messageId":"20231208-amusing-vengeful-raptor-e71a8b@meerkat","threadId":"60596","inReplyTo":"87h6ksk2hk.fsf@ellen.idiomdrottning.org","subject":"Re: getting git send-email patches from someone who is behind","fromName":"Konstantin Ryabitsev","fromEmail":"konstantin@linuxfoundation.org","sentAt":"2023-12-08T18:49:11Z","receivedAt":"2023-12-08T18:49:12Z","isPatch":false,"sender":{"key":"konstantin@linuxfoundation.org","avatar":"https://gravatar.com/avatar/7cb8827c6de56e1bd2dea16508c6708aa43feed3bf3813bcdacecdf96ceadd79?d=mp&s=160"},"body":"On Fri, Dec 08, 2023 at 06:50:31PM +0100, Sandra Snan wrote:\n> I have a li'l git send-email question. Someone sent me a patch set of six\n> patches today but they were not on most current main. I had to guess what\n> version they were sending to so I could git am when I was on that particular\n> version. I managed to sort it all out so this question is more for future\n> reference.\n> \n> Isn't there a way inside of the emails that it can show what version to\n> apply the patches to?\n> \n> Because now I was like \"OK, I remember talking to them the other day and\n> that means they probably are on what for me is HEAD^^\" and that turned out\n> to be correct, and sorting out the conflicts was also easy enough,\n> but if I hadn't talked to them beforehand I would've been completely lost.\n> \n> I asked another friend about it and he said:\n> \n> > it's possible to record the base commit:\n> > https://git-scm.com/docs/git-format-patch#_base_tree_information\n> > however, it's a bit finicky to do with git-send-email\n> \n> I dunno.\n> \n> I get that one of the fun parts about using patches instead of PRs is\n> that you can be a li'l more loosey goosey about exactly what commit\n> something is supposed to belong to but here I would've been completely\n> lost because the patchset just borked horribly right from the first patch.\n> \n> If others have run into this, what's the solution?\n\nYes, setting base-commit is the right solution here -- it will tell you\nexactly where in the tree it belongs. In its absence, tools like b4 will also\ntry to guess where the series might belong by comparing the file index\ninformation mentioned in the patches. It's a clever, but not exact process,\nbecause the patch may depend on changes in the files that aren't being\nmodified.\n\nIn general, having a base-commit: line in the cover letter or first patch is\nabsolutely the right way to go.\n\n-K\n"},{"id":"485477","messageId":"87a5qkjzdu.fsf@ellen.idiomdrottning.org","threadId":"60596","inReplyTo":"20231208-amusing-vengeful-raptor-e71a8b@meerkat","subject":"Re: getting git send-email patches from someone who is behind","fromName":"Sandra Snan","fromEmail":"sandra.snan@idiomdrottning.org","sentAt":"2023-12-08T18:57:33Z","receivedAt":"2023-12-08T18:57:36Z","isPatch":false,"sender":{"key":"sandra.snan@idiomdrottning.org","avatar":"https://gravatar.com/avatar/9f3cf671ef175db9ce2f833436f4f63b58f54651b1208ef07e63ee7443e86e82?d=mp&s=160"},"body":"Konstantin Ryabitsev <konstantin@linuxfoundation.org> writes:\n> Yes, setting base-commit is the right solution here -- it will \n> tell you exactly where in the tree it belongs.\n\nI didn't know that before today and that's good advice when \nsending patches, but if I'm receiving patches without that field \nset, I wonder how people are dealing with that.\n\n> In its absence, tools like b4 will also try to guess where the \n> series might belong by comparing the file index information \n> mentioned in the patches.\n\nAh, this! https://b4.docs.kernel.org/en/latest/\n\nThis looks wonderful, thank you!\n"}]}