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

Re: remove duplicate code and not needed break statement

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jul 18, 2010, 18:47 UTC
Message-ID
<20100718184716.GD14367@burratino>
In-Reply-To
<1279475399-6081-1-git-send-email-ralf.thielow@googlemail.com>
Hi Ralf!
Ralf Thielow wrote:
> Remove duplicate code and not needed break statement.

This looks like a reasonable change, with the nice effect of getting read_pack_info_file() to almost fit in one screen.

The commit message is not super clear.  I would say:
 Subject: update-server-info: Shorten read_pack_info_file()
 The correct responses to a D and a T line in .git/objects/info/packs
 are the same, so combine their case arms.  In both cases we already
 ‘goto’ out of the switch so while at it, remove a redundant ‘break’
 to avoid yet another line of code.
i.e., impact in the subject line, details in the commit message body.

It is missing a sign-off. See Documentation/SubmittingPatches for what that means.

Hope that helps, Jonathan

Previous: Ralf ThielowNext: Ralf Thielow
Message 4 of 9 in “remove duplicate code and not needed break statement”
  1. Ralf ThielowJul 18, 2010
  2. Valeo de VriesJul 18, 2010
  3. Ralf ThielowJul 18, 2010
  4. Jonathan NiederJul 18, 2010
  5. Ralf ThielowJul 18, 2010
  6. Erik Faye-LundJul 19, 2010
  7. Jonathan NiederJul 19, 2010
  8. Ralf ThielowJul 19, 2010
  9. Ralf ThielowJul 18, 2010

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.