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

Re: [PATCHv2 0/2] fixes to gitweb feature check code

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 29, 2008, 10:48 UTC
Message-ID
<200811291148.15182.jnareb@gmail.com>
In-Reply-To
<1227904793-1821-1-git-send-email-giuseppe.bilotta@gmail.com>
Dnia piątek 28. listopada 2008 21:39, Giuseppe Bilotta napisał:
Show 14 quoted lines
> This is v2 of the gitweb feature check fix patch, which has now been
> split into into a code patch and cleanup patch.
> 
> The first patch introduces git_get_feature() to clearly distinguish the
> feature retrieval from the boolean feature check (which is kept at
> git_check_feature()). The new function is used where appropriate.
> 
> The second patch cleans up use of git_check_feature(): since the
> function now returns a boolean instead of an array, the often-used
> construct
>   my ($somevar) = git_check_feature('somefeat');
> although still valid, becomes a rather clumsy stylistic choice, as it
> introduces an unnecessary ambiguity. Make it clear that we're now
> dealing with scalars by using scalar assignment.

It is gitweb_get_feature() (for retrieval) and gitweb_check_feature() (for checking), not git_get_feature() and git_check_feature().

I really like this series; making coding easier by removing need to use special construct, and making it easier to avoid mistakes is always a good thing.

Show 6 quoted lines
> Giuseppe Bilotta (2):
>   gitweb: fixes to gitweb feature check code
>   gitweb: clean up git_check_feature() calls
> 
>  gitweb/gitweb.perl |   52 +++++++++++++++++++++++++++++++++++-----------------
>  1 files changed, 35 insertions(+), 17 deletions(-)

I also like the split, as it separates improvement (much easier to use and less error prone gitweb_check_feature()) from style cleanup.

-- 
Jakub Narebski
Poland
Previous: Jakub NarebskiNext: Giuseppe Bilotta
Message 25 of 26 in “[PATCHv2 0/2] fixes to gitweb feature check code”
  1. Giuseppe BilottaNov 28, 2008
  2. 1/2 gitweb: fixes to gitweb feature check codeGiuseppe Bilotta, Nov 28, 2008
  3. 2/2 gitweb: clean up git_check_feature() callsGiuseppe Bilotta, Nov 28, 2008
  4. 2/2 gitweb: clean up gitweb_check_feature() callsGiuseppe Bilotta, Nov 29, 2008
  5. Jakub NarebskiNov 29, 2008
  6. 2/2 gitweb: clean up gitweb_check_feature() callsGiuseppe Bilotta, Nov 29, 2008
  7. Junio C HamanoNov 29, 2008
  8. Junio C HamanoNov 29, 2008
  9. 2/3 gitweb: rename gitweb_check_feature to gitweb_get_featureJunio C Hamano, Nov 29, 2008
  10. 3/3 gitweb: make gitweb_check_feature a boolean wrapperJunio C Hamano, Nov 29, 2008
  11. Giuseppe BilottaNov 29, 2008
  12. Junio C HamanoNov 30, 2008
  13. Giuseppe BilottaNov 30, 2008
  14. gitweb: fixes to gitweb feature check codeGiuseppe Bilotta, Nov 30, 2008
  15. Jakub NarebskiDec 2, 2008
  16. [PATCHv3bis] gitweb: fixes to gitweb feature check codeGiuseppe Bilotta, Dec 2, 2008
  17. Junio C HamanoDec 3, 2008
  18. Junio C HamanoDec 2, 2008
  19. Jakub NarebskiDec 3, 2008
  20. Giuseppe BilottaNov 29, 2008
  21. Junio C HamanoNov 29, 2008
  22. Jakub NarebskiNov 29, 2008
  23. Jakub NarebskiNov 29, 2008
  24. Jakub NarebskiNov 30, 2008
  25. Jakub NarebskiNov 29, 2008
  26. Giuseppe BilottaNov 29, 2008

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.