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

Re: [PATCH v4] json_writer: new routines to create data in JSON format

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Mar 27, 2018, 18:05 UTC
Message-ID
<c9c2ebba-9cde-9eed-bd08-34ce8b543787@ramsayjones.plus.com>
In-Reply-To
<2bc6f6a6-bf53-b87c-af02-156ad006a878@jeffhostetler.com>
On 27/03/18 18:14, Jeff Hostetler wrote:
Show 20 quoted lines
> 
> 
> On 3/27/2018 11:45 AM, Ramsay Jones wrote:
>>
>>
>> On 27/03/18 04:18, Ramsay Jones wrote:
>>> On 26/03/18 15:31, git@jeffhostetler.com wrote:
>>>> From: Jeff Hostetler <jeffhost@microsoft.com>
>>>>
>>> [snip]
>>>
>>> Thanks, this version fixes all issues I had (with the compilation
>>> and sparse warnings).
>>>
>>> [Was using UINT64_C(0xffffffffffffffff) a problem on windows?]
>>
>> BTW, I forgot to mention that you had some whitespace problems
>> with this patch, viz:
> 
> I ran "make sparse" on this and it did not complain about any of this.
No, sparse doesn't check for whitespace issues.
> What command do you run to get these messages?
'git am' told me when I applied the patch from the ML, and ...
> I know they appear as red in diffs (and I usually double check that),
> but I had not seen a command to complain about them like this.

... since I applied the patch yesterday, it was easier to demonstrate the issue today using this command:

Show 13 quoted lines
>>    $ git log --oneline -1 --check master-json
>>    ab643d838 (master-json) json_writer: new routines to create data in JSON format
>>    t/helper/test-json-writer.c:280: trailing whitespace.
>>    + */
>>    t/t0019-json-writer.sh:179: indent with spaces.
>>    +        "g": 0,
>>    t/t0019-json-writer.sh:180: indent with spaces.
>>    +        "h": 1
>>    $
> 
> the leading spaces are required in this case.
> the pretty json output contains 8 spaces for that sub-structure not a tab.
> is there a preferred way to denote this in the test script?
OK, I should have looked at the output more closely! :(

Only the trailing whitespace in test-json-writer.c needs to be addressed then.

ATB, Ramsay Jones

Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 14 in “routines to generate JSON data”
  1. routines to generate JSON datagit@jeffhostetler.com, Mar 26, 2018
  2. json_writer: new routines to create data in JSON formatgit@jeffhostetler.com, Mar 26, 2018
  3. Ramsay JonesMar 27, 2018
  4. Jeff HostetlerMar 27, 2018
  5. Ramsay JonesMar 27, 2018
  6. Jeff HostetlerMar 27, 2018
  7. Wink SavilleMar 27, 2018
  8. Randall S. BeckerMar 27, 2018
  9. Junio C HamanoMar 28, 2018
  10. Ramsay JonesMar 27, 2018
  11. Junio C HamanoMar 28, 2018
  12. Duy NguyenJun 2, 2018
  13. Jeff KingJun 2, 2018
  14. Jeff HostetlerJun 4, 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.