All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: ubuntu733 <ubuntu2012@126.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] microproject for GSOC
Date: Fri, 14 Mar 2014 18:10:57 +0100	[thread overview]
Message-ID: <vpq4n30aeou.fsf@anie.imag.fr> (raw)
In-Reply-To: <1394815367-9706-1-git-send-email-ubuntu2012@126.com> (ubuntu's message of "Sat, 15 Mar 2014 00:42:47 +0800")

Hi,

Welcome to the Git community, and welcome to the GSOC program. Below are
some comments to give you a taste of what a review looks like on this
list. Do take the comments seriously (they should be addressed), but
don't take them badly: critic is meant to be constructive.

ubuntu733 <ubuntu2012@126.com> writes:
^^^^^^^^^

Please, use a real name when you contribute to Git.

> Apply for GSOC.The microprojects is rewriter diff-index.c

This part of your message will become the commit message (i.e. cast in
stone forever in git.git's history). The point is not that you want to
apply for GSOC, but what the patch does and more importantly why it does
it.

> +#define REMOVE 1

If the code is to be removed, then remove it. That's why we use a
version control system ;-).

> -	while ((e = readdir(dir)))
> -		if (strcmp(".", e->d_name) && strcmp("..", e->d_name))
> -			string_list_insert(list, e->d_name);
> -
> +	while ((e = readdir(dir))) {
> +		while(is_dot_or_dotdot(e->d_name))

Missing space between "while" and "(".

> +                      break;

Broken indentation (indent with space).

This while (...) break; seems really weird to me: if the condition is
false, then you exit the loop because it's a while loop, and if the
condition is true, you exit the loop because of the break. Isn't that a
no-op?

> +		string_list_insert(list, e->d_name);
> +              }

Broken indentation (misplaced }).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2014-03-14 17:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14 16:42 [PATCH] microproject for GSOC ubuntu733
2014-03-14 17:10 ` Matthieu Moy [this message]
2014-03-14 17:44   ` 沈承恩
2014-03-14 18:13   ` 沈承恩
2014-03-14 18:59     ` Matthieu Moy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpq4n30aeou.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=ubuntu2012@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.