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

Re: [PATCH 1/7] config.c: fix accuracy of line number in errors

From
Tanay Abhra <tanayabh@gmail.com>
Date
Jul 24, 2014, 18:40 UTC
Message-ID
<53D15307.4060601@gmail.com>
In-Reply-To
<xmqq1ttaa9sa.fsf@gitster.dls.corp.google.com>
On 7/25/2014 12:01 AM, Junio C Hamano wrote:
Show 15 quoted lines
> Tanay Abhra <tanayabh@gmail.com> writes:
> 
>> On 7/24/2014 3:19 AM, Junio C Hamano wrote:
>>> Tanay Abhra <tanayabh@gmail.com> writes:
>>>
>>>> If a callback returns a negative value to `git_config*()` family,
>>>> they call `die()` while printing the line number and the file name.
>>>> Currently the printed line number is off by one, thus printing the
>>>> wrong line number.
>>>>
>>>> Make `linenr` point to the line we just parsed during the call
>>>> to callback to get accurate line number in error messages.
>>>>
>>>> Discovered-by: Tanay Abhra <tanayabh@gmail.com>
>>>> Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
This patch should have looked like,
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
<commit message>
Commit-message-by: Tanay Abhra <tanayabh@gmail.com>
Show 22 quoted lines
>>>
>>> Thanks.
>>>
>>> I am not sure what to read in these two lines.  Was the fix done by
>>> you or Matthieu?
>>>
>>
>> I misunderstood the meaning of the message trailers. I will correct
>> it in the next re roll.
> 
> Well, that does not really answer my question, and it does not tell
> us if you now understand the meaning of trailers correctly, or
> replaced an earlier misunderstanding with a different
> misunderstanding ;-)
> 
> More importantly, it would not help me interpret what you mean when
> you write a sequence like this:
> 
> 	From: tanay
>         S-o-b: matthieu
>         S-o-b: tanay
>

Actually it was because that patch contained fixup patch from Matthieu squashed into it, that is why there were two signoffs.

Show 8 quoted lines
> which does not quite make sense and leave the reader puzzled.
> 
> If the patch was authored by you and helped by matthieu, the first
> S-o-b would be lying.  If the patch was written by matthieu and you
> are merely relaying, then the authorship From is lying.  If the
> patch was written by you and matthieu is relaying, then the two
> S-o-bs are in incorrect order.
> 
Previous: Junio C HamanoNext: Matthieu Moy
Message 6 of 51 in “Rewrite `git_config()` using config-set API”
  1. 0/7 Rewrite `git_config()` using config-set APITanay Abhra, Jul 23, 2014
  2. 1/7 config.c: fix accuracy of line number in errorsTanay Abhra, Jul 23, 2014
  3. Junio C HamanoJul 23, 2014
  4. Tanay AbhraJul 24, 2014
  5. Junio C HamanoJul 24, 2014
  6. Tanay AbhraJul 24, 2014
  7. Matthieu MoyJul 24, 2014
  8. 2/7 rewrite git_config() to use the config-set APITanay Abhra, Jul 23, 2014
  9. Matthieu MoyJul 23, 2014
  10. Matthieu MoyJul 23, 2014
  11. Junio C HamanoJul 23, 2014
  12. Matthieu MoyJul 24, 2014
  13. 3/7 add a test for semantic errors in config filesTanay Abhra, Jul 23, 2014
  14. Matthieu MoyJul 23, 2014
  15. Junio C HamanoJul 23, 2014
  16. Tanay AbhraJul 24, 2014
  17. Matthieu MoyJul 24, 2014
  18. Junio C HamanoJul 24, 2014
  19. 4/7 add line number and file name info to `config_set`Tanay Abhra, Jul 23, 2014
  20. Junio C HamanoJul 23, 2014
  21. 5/7 enforce `xfuncname` precedence over `funcname`Tanay Abhra, Jul 23, 2014
  22. Matthieu MoyJul 23, 2014
  23. Eric SunshineJul 23, 2014
  24. Junio C HamanoJul 23, 2014
  25. Matthieu MoyJul 24, 2014
  26. Junio C HamanoJul 24, 2014
  27. Tanay AbhraJul 24, 2014
  28. Matthieu MoyJul 24, 2014
  29. John KeepingJul 24, 2014
  30. Junio C HamanoJul 24, 2014
  31. Tanay AbhraJul 24, 2014
  32. Junio C HamanoJul 24, 2014
  33. Ramsay JonesJul 24, 2014
  34. Tanay AbhraJul 25, 2014
  35. Matthieu MoyJul 25, 2014
  36. Junio C HamanoJul 25, 2014
  37. Matthieu MoyJul 25, 2014
  38. Junio C HamanoJul 25, 2014
  39. 6/7 config: add `git_die_config()` to the config-set APITanay Abhra, Jul 23, 2014
  40. 7/7 Add tests for `git_config_get_string()`Tanay Abhra, Jul 23, 2014
  41. Matthieu MoyJul 23, 2014
  42. Matthieu MoyJul 23, 2014
  43. Junio C HamanoJul 23, 2014
  44. Tanay AbhraJul 24, 2014
  45. Matthieu MoyJul 24, 2014
  46. Tanay AbhraJul 24, 2014
  47. Matthieu MoyJul 24, 2014
  48. Junio C HamanoJul 24, 2014
  49. 1/2 add `config_set` API for caching config-like filesTanay Abhra, Jul 24, 2014
  50. Junio C HamanoJul 24, 2014
  51. 2/2 test-config: add tests for the config_set APITanay Abhra, Jul 24, 2014

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.