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

Re: [PATCH 65/83] builtin/apply: make gitdiff_verify_name() return -1 on error

From
Christian Couder <christian.couder@gmail.com>
Date
May 1, 2016, 19:31 UTC
Message-ID
<CAP8UFD38YhMkqYLxLrSA4oi2D=3mjo+grJ00K-5LPxpH3rNBdA@mail.gmail.com>
In-Reply-To
<CACsJy8ATSuijr9beSuJ7X51hsmFVCs7TKEYd3puoLPMtVjKZ9g@mail.gmail.com>
On Mon, Apr 25, 2016 at 3:36 PM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 23 quoted lines
> On Sun, Apr 24, 2016 at 8:34 PM, Christian Couder
> <christian.couder@gmail.com> wrote:
>> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
>> ---
>>  builtin/apply.c | 52 ++++++++++++++++++++++++++++++----------------------
>>  1 file changed, 30 insertions(+), 22 deletions(-)
>>
>> diff --git a/builtin/apply.c b/builtin/apply.c
>> index 6b8ba2a..268356b 100644
>> --- a/builtin/apply.c
>> +++ b/builtin/apply.c
>> @@ -812,7 +812,7 @@ static int gitdiff_hdrend(struct apply_state *state,
>>                           const char *line,
>>                           struct patch *patch)
>>  {
>> -       return -1;
>> +       return 1;
>>  }
>
> These are in a function group that will be called as p->fn() in
> parse_git_header(). Is it possible to isolate them in a separate
> patch? This patch can follow after, which covers only
> gitdiff_verify_name() returning -1 and its call sites.

Yeah, I had planned to do something like that when developing the series but I forgot.

Thanks, Christian.

Previous: Duy NguyenNext: Christian Couder
Message 119 of 156 in “libify apply and use lib in am”
  1. 00/83 libify apply and use lib in amChristian Couder, Apr 24, 2016
  2. 01/83 builtin/apply: make gitdiff_verify_name() return voidChristian Couder, Apr 24, 2016
  3. 02/83 builtin/apply: avoid parameter shadowing 'p_value' globalChristian Couder, Apr 24, 2016
  4. 03/83 builtin/apply: avoid parameter shadowing 'linenr' globalChristian Couder, Apr 24, 2016
  5. Junio C HamanoApr 27, 2016
  6. Christian CouderApr 27, 2016
  7. 04/83 builtin/apply: avoid local variable shadowing 'len' parameterChristian Couder, Apr 24, 2016
  8. 05/83 builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()Christian Couder, Apr 24, 2016
  9. Stefan BellerApr 25, 2016
  10. Christian CouderApr 26, 2016
  11. Junio C HamanoApr 26, 2016
  12. Christian CouderApr 27, 2016
  13. 06/83 builtin/apply: move 'options' variable into cmd_apply()Christian Couder, Apr 24, 2016
  14. 07/83 builtin/apply: introduce 'struct apply_state' to start libifyingChristian Couder, Apr 24, 2016
  15. 08/83 builtin/apply: move 'unidiff_zero' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  16. 09/83 builtin/apply: move 'check' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  17. Stefan BellerApr 25, 2016
  18. Christian CouderApr 26, 2016
  19. Stefan BellerApr 26, 2016
  20. 10/83 builtin/apply: move 'check_index' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  21. Junio C HamanoApr 26, 2016
  22. 11/83 builtin/apply: move 'apply_in_reverse' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  23. 12/83 builtin/apply: move 'apply_with_reject' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  24. 13/83 builtin/apply: move 'apply_verbosely' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  25. 14/83 builtin/apply: move 'update_index' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  26. 15/83 builtin/apply: move 'allow_overlap' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  27. 16/83 builtin/apply: move 'cached' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  28. 17/83 builtin/apply: move 'diffstat' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  29. 18/83 builtin/apply: move 'numstat' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  30. Stefan BellerApr 25, 2016
  31. Christian CouderApr 26, 2016
  32. 19/83 builtin/apply: move 'summary' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  33. 20/83 builtin/apply: move 'threeway' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  34. 21/83 builtin/apply: move 'no-add' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  35. 22/83 builtin/apply: move 'unsafe_paths' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  36. Junio C HamanoApr 26, 2016
  37. Christian CouderApr 27, 2016
  38. Junio C HamanoApr 27, 2016
  39. 23/83 builtin/apply: move 'line_termination' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  40. 24/83 builtin/apply: move 'fake_ancestor' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  41. 25/83 builtin/apply: move 'p_context' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  42. 26/83 builtin/apply: move 'apply' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  43. 27/83 builtin/apply: move 'read_stdin' global into cmd_apply()Christian Couder, Apr 24, 2016
  44. Junio C HamanoApr 26, 2016
  45. Christian CouderApr 27, 2016
  46. 28/83 builtin/apply: move 'patch_input_file' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  47. 29/83 builtin/apply: move 'limit_by_name' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  48. 30/83 builtin/apply: move 'has_include' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  49. 31/83 builtin/apply: move 'p_value' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  50. 32/83 builtin/apply: move 'p_value_known' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  51. 33/83 builtin/apply: move 'root' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  52. Stefan BellerApr 25, 2016
  53. Stefan BellerApr 25, 2016
  54. Christian CouderApr 26, 2016
  55. 34/83 builtin/apply: move 'whitespace_error' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  56. 35/83 builtin/apply: move 'whitespace_option' into 'struct apply_state'Christian Couder, Apr 24, 2016
  57. 36/83 builtin/apply: remove whitespace_option arg from set_default_whitespace_mode()Christian Couder, Apr 24, 2016
  58. 37/83 builtin/apply: move 'squelch_whitespace_errors' into 'struct apply_state'Christian Couder, Apr 24, 2016
  59. 38/83 builtin/apply: move 'applied_after_fixing_ws' into 'struct apply_state'Christian Couder, Apr 24, 2016
  60. 39/83 builtin/apply: move 'ws_error_action' into 'struct apply_state'Christian Couder, Apr 24, 2016
  61. Junio C HamanoApr 26, 2016
  62. Junio C HamanoApr 26, 2016
  63. Christian CouderApr 27, 2016
  64. 40/83 builtin/apply: move 'ws_ignore_action' into 'struct apply_state'Christian Couder, Apr 24, 2016
  65. 41/83 builtin/apply: move 'max_change' and 'max_len' into 'struct apply_state'Christian Couder, Apr 24, 2016
  66. 42/83 builtin/apply: move 'linenr' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  67. 43/83 builtin/apply: move 'fn_table' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  68. 44/83 builtin/apply: move 'symlink_changes' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  69. 45/83 builtin/apply: move 'state' init into init_apply_state()Christian Couder, Apr 24, 2016
  70. Eric SunshineApr 25, 2016
  71. Christian CouderApr 27, 2016
  72. 46/83 builtin/apply: move 'state' check into check_apply_state()Christian Couder, Apr 24, 2016
  73. 47/83 builtin/apply: move applying patches into apply_all_patches()Christian Couder, Apr 24, 2016
  74. Stefan BellerApr 25, 2016
  75. Christian CouderApr 27, 2016
  76. 48/83 builtin/apply: rename 'prefix_' parameter to 'prefix'Christian Couder, Apr 24, 2016
  77. 49/83 builtin/apply: move 'lock_file' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  78. Eric SunshineApr 25, 2016
  79. Junio C HamanoApr 25, 2016
  80. Christian CouderApr 28, 2016
  81. Junio C HamanoApr 28, 2016
  82. Christian CouderApr 30, 2016
  83. 50/83 builtin/apply: get rid of the 'newfd' globalChristian Couder, Apr 24, 2016
  84. 51/83 builtin/apply: make apply_patch() return -1 instead of die()ingChristian Couder, Apr 24, 2016
  85. Eric SunshineApr 26, 2016
  86. Christian CouderApr 30, 2016
  87. 52/83 builtin/apply: read_patch_file() return -1 instead of die()ingChristian Couder, Apr 24, 2016
  88. 53/83 builtin/apply: make find_header() return -1 instead of die()ingChristian Couder, Apr 24, 2016
  89. Duy NguyenApr 25, 2016
  90. Eric SunshineApr 27, 2016
  91. Christian CouderMay 1, 2016
  92. Eric SunshineApr 27, 2016
  93. Christian CouderMay 1, 2016
  94. 54/83 builtin/apply: make parse_chunk() return a negative integer on errorChristian Couder, Apr 24, 2016
  95. Eric SunshineMay 1, 2016
  96. Christian CouderMay 1, 2016
  97. 55/83 builtin/apply: make parse_single_patch() return -1 on errorChristian Couder, Apr 24, 2016
  98. Eric SunshineMay 1, 2016
  99. 56/83 apply: move 'struct apply_state' to apply.hChristian Couder, Apr 24, 2016
  100. 57/83 builtin/apply: libify parse_whitespace_option()Christian Couder, Apr 24, 2016
  101. 58/83 builtin/apply: libify parse_ignorewhitespace_option()Christian Couder, Apr 24, 2016
  102. 59/83 builtin/apply: move init_apply_state() to apply.cChristian Couder, Apr 24, 2016
  103. Eric SunshineMay 1, 2016
  104. Christian CouderMay 1, 2016
  105. 60/83 apply: libify init_apply_state()Christian Couder, Apr 24, 2016
  106. 61/83 builtin/apply: libify check_apply_state()Christian Couder, Apr 24, 2016
  107. Duy NguyenApr 25, 2016
  108. Christian CouderMay 1, 2016
  109. 62/83 builtin/apply: move check_apply_state() to apply.cChristian Couder, Apr 24, 2016
  110. 63/83 builtin/apply: make apply_all_patches() return -1 on errorChristian Couder, Apr 24, 2016
  111. Duy NguyenApr 25, 2016
  112. Christian CouderMay 1, 2016
  113. Eric SunshineMay 1, 2016
  114. Johannes SchindelinMay 2, 2016
  115. Christian CouderMay 3, 2016
  116. 64/83 builtin/apply: make parse_traditional_patch() return -1 on errorChristian Couder, Apr 24, 2016
  117. 65/83 builtin/apply: make gitdiff_verify_name() return -1 on errorChristian Couder, Apr 24, 2016
  118. Duy NguyenApr 25, 2016
  119. Christian CouderMay 1, 2016
  120. 66/83 builtin/apply: change die_on_unsafe_path() to check_unsafe_path()Christian Couder, Apr 24, 2016
  121. 67/83 builtin/apply: make build_fake_ancestor() return -1 on errorChristian Couder, Apr 24, 2016
  122. Eric SunshineMay 2, 2016
  123. Christian CouderMay 3, 2016
  124. 68/83 builtin/apply: make remove_file() return -1 on errorChristian Couder, Apr 24, 2016
  125. 69/83 builtin/apply: make add_conflicted_stages_file() return -1 on errorChristian Couder, Apr 24, 2016
  126. Eric SunshineMay 2, 2016
  127. Christian CouderMay 3, 2016
  128. 70/83 builtin/apply: make add_index_file() return -1 on errorChristian Couder, Apr 24, 2016
  129. 71/83 builtin/apply: make create_file() return -1 on errorChristian Couder, Apr 24, 2016
  130. 72/83 builtin/apply: make write_out_one_result() return -1 on errorChristian Couder, Apr 24, 2016
  131. 73/83 builtin/apply: make write_out_results() return -1 on errorChristian Couder, Apr 24, 2016
  132. Eric SunshineMay 2, 2016
  133. Christian CouderMay 3, 2016
  134. 74/83 builtin/apply: make try_create_file() return -1 on errorChristian Couder, Apr 24, 2016
  135. Eric SunshineMay 2, 2016
  136. Christian CouderMay 3, 2016
  137. 75/83 builtin/apply: make create_one_file() return -1 on errorChristian Couder, Apr 24, 2016
  138. 76/83 builtin/apply: rename option parsing functionsChristian Couder, Apr 24, 2016
  139. 77/83 apply: rename and move opt constants to apply.hChristian Couder, Apr 24, 2016
  140. Ramsay JonesApr 24, 2016
  141. Christian CouderApr 24, 2016
  142. Christian CouderApr 24, 2016
  143. Ramsay JonesApr 24, 2016
  144. Duy NguyenApr 25, 2016
  145. Christian CouderApr 25, 2016
  146. Johannes SchindelinApr 25, 2016
  147. Duy NguyenApr 25, 2016
  148. Christian CouderApr 25, 2016
  149. Duy NguyenApr 25, 2016
  150. Duy NguyenApr 25, 2016
  151. Christian CouderMay 4, 2016
  152. Duy NguyenMay 4, 2016
  153. Christian CouderMay 5, 2016
  154. Christian CouderMay 6, 2016
  155. Junio C HamanoMay 6, 2016
  156. Christian CouderMay 8, 2016

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.