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

Re: format-patch: no 'prerequisite-patch-id' info when specifying commit range

From
Ye Xiaolong <xiaolong.ye@intel.com>
Date
Jun 4, 2018, 02:41 UTC
Message-ID
<20180604024101.GO27396@yexl-desktop>
In-Reply-To
<xmqqh8mj70w6.fsf@gitster-ct.c.googlers.com>
On 06/04, Junio C Hamano wrote:
Show 24 quoted lines
>Ye Xiaolong <xiaolong.ye@intel.com> writes:
>
>> I narrowed down the problem to revision walk, if users specify the commit range
>> via "Z..C" pattern, the first prepare_revision_walk function called in
>> cmd_format_patch would mark all parents (ancestors) of Z to be uninteresting,
>> thus the next revision walk in prepare_bases wouldn't be able to reach
>> prerequisite patches, one quick solution I can think of is to clear
>> UNINTERESTING flag in reset_revision_walk, like below:
>>
>> void reset_revision_walk(void)
>> {
>> 	clear_object_flags(SEEN | ADDED | SHOWN| UNINTERESTING);
>> }
>
>When you are done with objects that are UNINTERESTING in your
>application (i.e. only when "format-patch" is told to compute list
>of prereq patches by doing an extra revision walk), your application
>can call clear_object_flags() on the flags you are done with, I
>would think.
>
>But the current callers of reset_revision_walk() do not expect any
>flags other than the ones that are used to keep track of the
>traversal state, so it is likely you will break them if you suddenly
>started to clear flags randomly.

Got it, I'll try to call clear_object_flags in format-patch related codepatch only, not to touch the global reset_revision_walk.

Thanks, Xiaolong

Previous: Junio C HamanoNext: Xiaolong Ye
Message 5 of 9 in “format-patch: no 'prerequisite-patch-id' info when specifying commit range”
  1. Eduardo HabkostMay 29, 2018
  2. Ye XiaolongMay 30, 2018
  3. Ye XiaolongJun 3, 2018
  4. Junio C HamanoJun 4, 2018
  5. Ye XiaolongJun 4, 2018
  6. format-patch: clear UNINTERESTING flag before prepare_basesXiaolong Ye, Jun 4, 2018
  7. Eduardo HabkostJun 4, 2018
  8. Ye XiaolongJun 19, 2018
  9. Stefan BellerJun 19, 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.