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

Re: [PATCH 3/4] {fast-export,transport-helper}: style cleanups

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 9, 2013, 19:23 UTC
Message-ID
<CAMP44s3XsVb6k1Oynw_y7yvV1fWaSDGquFoRNMcaN0yGD5_UNQ@mail.gmail.com>
In-Reply-To
<7vbo8k9exd.fsf@alter.siamese.dyndns.org>
On Thu, May 9, 2013 at 1:38 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>>>>         if (!author)
>>>> -               die ("Could not find author in commit %s",
>>>> +               die("Could not find author in commit %s",
>>>>                      sha1_to_hex(commit->object.sha1));
>>>
>>> It looks like your simple replace didn't account for calls with
>>> multiple lines.  Now the remaining lines don't line up.
>>> :-)  There's several more places like this in the patch.
>>
>> AFAIK neither the git or the Linux code-style specify how multiple
>> lines with open parenthesis should align.
>
> Then the usual "follow the style of surrounding code" rule would
> apply, no?

The surrounding code has all the open parentheses wrong for these functions, that doesn't mean the surrounding code is correct.

> It is clear that the original wants to align the opening
> dq of "Could..."  and 's' at the beginning of sha1_to_hex().
>
> Why is it so hard for you to say "Good eyes, thanks"?

Because I didn't miss it, it was deliberate from my side, if nobody can be bothered to add a rule on the coding style guidelines, why should I bother? As I said, this pops up from time to time in Linux mailing lists[1], but at the end of the day the CodingStyle doesn't specify what should be the way to align these, so any discussion about whether they are properly aligned or not is futile.

If it was up to me, I would use the alignment that makes more sense, which is to align two tabs always, this way, each time somebody decides to change the first line, the rest of the lines don't need to change, which is something I see through the CodingStyle; try to avoid a style that would generate bigger diffs.

But if I did such alignment I might create even more discussion, so I deliberately decided not to change the alignment at all, which still leaves the code in accordance with the CodingStyle.

[1] http://article.gmane.org/gmane.linux.kernel/1407801
-- 
Felipe Contreras
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 40 in “trivial patches”
  1. 0/4 trivial patchesFelipe Contreras, May 9, 2013
  2. 1/4 documentation: trivial style cleanupsFelipe Contreras, May 9, 2013
  3. Junio C HamanoMay 9, 2013
  4. 2/4 transport-helper: trivial style cleanupFelipe Contreras, May 9, 2013
  5. Junio C HamanoMay 9, 2013
  6. 3/4 {fast-export,transport-helper}: style cleanupsFelipe Contreras, May 9, 2013
  7. John SzakmeisterMay 9, 2013
  8. Felipe ContrerasMay 9, 2013
  9. John SzakmeisterMay 9, 2013
  10. Felipe ContrerasMay 9, 2013
  11. Ramkumar RamachandraMay 9, 2013
  12. Felipe ContrerasMay 9, 2013
  13. Junio C HamanoMay 9, 2013
  14. Felipe ContrerasMay 9, 2013
  15. Junio C HamanoMay 9, 2013
  16. Felipe ContrerasMay 9, 2013
  17. Felipe ContrerasMay 16, 2013
  18. Junio C HamanoMay 16, 2013
  19. Felipe ContrerasMay 16, 2013
  20. Junio C HamanoMay 16, 2013
  21. Felipe ContrerasMay 16, 2013
  22. Junio C HamanoMay 16, 2013
  23. Ramkumar RamachandraMay 16, 2013
  24. Felipe ContrerasMay 16, 2013
  25. Felipe ContrerasMay 16, 2013
  26. Felipe ContrerasMay 17, 2013
  27. Ramkumar RamachandraMay 17, 2013
  28. Felipe ContrerasMay 17, 2013
  29. Junio C HamanoMay 17, 2013
  30. Felipe ContrerasMay 17, 2013
  31. Matthieu MoyMay 17, 2013
  32. Felipe ContrerasMay 17, 2013
  33. Matthieu MoyMay 17, 2013
  34. Felipe ContrerasMay 17, 2013
  35. 4/4 fast-export: trivial cleanupFelipe Contreras, May 9, 2013
  36. John SzakmeisterMay 9, 2013
  37. Felipe ContrerasMay 9, 2013
  38. John SzakmeisterMay 9, 2013
  39. Junio C HamanoMay 9, 2013
  40. Felipe ContrerasMay 16, 2013

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.