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

Re: [PATCH 12/20] alias: trivial style fix

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Oct 14, 2013, 21:21 UTC
Message-ID
<525c6067716ea_197a905e84a2@nysa.notmuch>
In-Reply-To
<20131014141806.GB21200@google.com>
Jonathan Nieder wrote:
Show 12 quoted lines
> Stefan Beller wrote:
> > On 10/12/2013 09:07 AM, Felipe Contreras wrote:
> 
> >> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> >
> > Not sure if it's worth by a newcomer. ;)
> 
> A second set of eyes is always welcome.
> 
> My thoughts: I have to admit I don't see much value in mechanical
> replacements like this one when done piecemeal and without other more
> significant changes on top.

A code-style fix is a code-style fix. If you don't send and apply code-style fixes, your code would remain forever inconsistent, and not following the style.

It's interesting how the most successfull project in history has a different take on this:

http://article.gmane.org/gmane.linux.acpi.devel/42407

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=915ea7e41439efa7793814cdf4338cb6b003538a https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=21fcb34e28e99291e91d83422f2824f11b3c9ce9 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=28ee793e7ad4a00e41c6267075501694c94451fb

Show 15 quoted lines
> >> --- a/alias.c
> >> +++ b/alias.c
> >> @@ -5,7 +5,7 @@ static char *alias_val;
> >>  
> >>  static int alias_lookup_cb(const char *k, const char *v, void *cb)
> >>  {
> >> -	if (!prefixcmp(k, "alias.") && !strcmp(k+6, alias_key)) {
> >> +	if (!prefixcmp(k, "alias.") && !strcmp(k + 6, alias_key)) {
> 
> does not look worth the churn and mailing list noise to me.
> 
> A patch that globally took care of these var+constant constructs
> without surrounding space and did nothing else, once and for all to
> avoid later noise, may or may not be useful.  I suspect even that
> wouldn't be worth it, since "k+6" already seems perfectly readable.
This comes from the Linux kernel code-style:

---- Use one space around (on each side of) most binary and ternary operators, such as any of these:

	=  +  -  <  >  *  /  %  |  &  ^  <=  >=  ==  !=  ?  :
----
So no, to me and a huge lot of developers it's not "perfectly readable".
-- 
Felipe Contreras
Previous: Jonathan NiederNext: Felipe Contreras
Message 23 of 26 in “doc: git-foo was obsoleted several years ago”
  1. 10/20 doc: git-foo was obsoleted several years agoFelipe Contreras, Oct 12, 2013
  2. 00/20 Trivial pachesFelipe Contreras, Oct 12, 2013
  3. 03/20 pull: cleanup documentationFelipe Contreras, Oct 12, 2013
  4. 20/20 add: avoid yoda conditionsFelipe Contreras, Oct 12, 2013
  5. 08/20 branch: trivial style fixFelipe Contreras, Oct 12, 2013
  6. 15/20 pretty: trivial style fixFelipe Contreras, Oct 12, 2013
  7. 19/20 setup: trivial style fixesFelipe Contreras, Oct 12, 2013
  8. 13/20 transport-helper: trivial style fixFelipe Contreras, Oct 12, 2013
  9. 01/20 merge: simplify ff-only optionFelipe Contreras, Oct 12, 2013
  10. 16/20 revision: trivial style fixesFelipe Contreras, Oct 12, 2013
  11. Stefan BellerOct 12, 2013
  12. Felipe ContrerasOct 12, 2013
  13. 17/20 diff: trivial style fixFelipe Contreras, Oct 12, 2013
  14. 05/20 remote: fix trivial memory leakFelipe Contreras, Oct 12, 2013
  15. 07/20 shortlog: add missing declarationFelipe Contreras, Oct 12, 2013
  16. 11/20 symbolic-ref: trivial style fixFelipe Contreras, Oct 12, 2013
  17. 06/20 revision: add missing includeFelipe Contreras, Oct 12, 2013
  18. 18/20 run-command: trivial style fixesFelipe Contreras, Oct 12, 2013
  19. 02/20 t: replace pulls with mergesFelipe Contreras, Oct 12, 2013
  20. 12/20 alias: trivial style fixFelipe Contreras, Oct 12, 2013
  21. Stefan BellerOct 12, 2013
  22. Jonathan NiederOct 14, 2013
  23. Felipe ContrerasOct 14, 2013
  24. 04/20 fetch: add missing documentationFelipe Contreras, Oct 12, 2013
  25. 09/20 sha1-name: trivial style cleanupFelipe Contreras, Oct 12, 2013
  26. 14/20 describe: trivial style fixesFelipe Contreras, Oct 12, 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.