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

Re: [PATCH] Rewrite diff-no-index.c:read_directory() to use is_dot_or_dotdot() and rename it to read_dir()

From
Thomas Rast <tr@thomasrast.ch>
Date
Mar 16, 2014, 11:07 UTC
Message-ID
<87eh22xuzb.fsf@thomasrast.ch>
In-Reply-To
<CAPGnZZn_Wz=LywVevmuXWQX4nO67EKMPazB8jKv-jTZ178=HdQ@mail.gmail.com>
Akshay Aurora <akshayaurora@yahoo.com> writes:
Show 7 quoted lines
> Forgot to mention, this is one of the microprojects for GSoC this
> year. Would be great to have some feedback.
>
> On Fri, Mar 14, 2014 at 6:09 PM, Akshay Aurora <akshayaurora@yahoo.com> wrote:
>> I have renamed diff-no-index.c:read_directory() to read_dir() to avoid name collision with dir.c:read_directory()
>>
>> Signed-off-by: Akshay Aurora <akshayaurora@yahoo.com>

Hmm, the original mail never made it through to me, and gmane doesn't seem to have it either. What happened here? The headers suggest you used git-send-email, which should avoid these problems. Can you dig up the command and configuration you used to send it (but be careful to not post your password!)?

On the patch itself:
> Subject: Re: [PATCH] Rewrite diff-no-index.c:read_directory() to use is_dot_or_dotdot() and rename it to read_dir()

The subject line is very long. Aim for 50 characters, but certainly no more than 72.

You are also conflating two separate things into one patch. Try to avoid doing that.

Furthermore I am unconvinced that renaming a function from read_directory() to read_dir() is a win. What are you trying to improve by the rename? Renames are good if they improve clarity and/or consistency, but read_dir() just risks confusion with readdir() and I cannot see any gain in consistency that would compensate for it.

>> I have renamed diff-no-index.c:read_directory() to read_dir() to avoid name collision with dir.c:read_directory()
Please stick to the style outlined in SubmittingPatches:
  The body should provide a meaningful commit message, which:
    . explains the problem the change tries to solve, iow, what is wrong
      with the current code without the change.
    . justifies the way the change solves the problem, iow, why the
      result with the change is better.
    . alternate solutions considered but discarded, if any.
  Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
  instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
  to do frotz", as if you are giving orders to the codebase to change
  its behaviour.  Try to make sure your explanation can be understood
  without external resources. Instead of giving a URL to a mailing list
  archive, summarize the relevant points of the discussion.
Also, please wrap your commit messages at 72 characters.
>> ---
>>  diff-no-index.c | 9 +++++----
The microproject idea said
  Rewrite diff-no-index.c:read_directory() to use
  is_dot_or_dotdot(). Try to find other sites that can use that
  function.
Are there any others?
-- 
Thomas Rast
tr@thomasrast.ch
Previous: Akshay Aurora
Message 2 of 2 in “Re: [PATCH] Rewrite diff-no-index.c:read_directory() to use is_dot_or_dotdot() and rename it to read_dir()”
  1. Akshay AuroraMar 15, 2014
  2. Thomas RastMar 16, 2014

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.