git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Robert David <robert.david.public@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, Thomas Rast <trast@student.ethz.ch>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Git Mailing List <git@vger.kernel.org>,
	Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: Re: GSOC idea: build in scripts and cleanups
Date: Fri, 8 Apr 2011 11:51:22 +0200	[thread overview]
Message-ID: <201104081151.23392.robert.david.public@gmail.com> (raw)
In-Reply-To: <7vk4f5emcm.fsf@alter.siamese.dyndns.org>


[-- Attachment #1.1: Type: Text/Plain, Size: 4114 bytes --]

Dne pátek 08 dubna 2011 00:19:05 Junio C Hamano napsal(a):
> Robert David <robert.david.public@gmail.com> writes:
> > This task also include cleaning the functionality of this code, to make
> > these functions more "standardized".
> > This means consolidate the differences in these functions and make them
> > more consistent in the user point of view.
> 
> Standardized, consolidate, consistent are all pretty words but at the same
> time they are highly subjective. Even though you may not have to have the
> detailed description of everything in the proposal, you would need to at
> least have a handful of examples of what are wrong with the current code
> in mind when making such a sweeping statement, but I cannot sense that
> from this proposal.

While I have read the code, first thing I noticed is the inconsistence of 
general coding standarts used. Sometimes the code is pretty nice divided into 
subrutines to get the code understand fast, and sometimes it is a huge 
subrutine that does as much things as possible, and thus is no so good to read 
(also I don't speak here about comments missing in a lot of code, where 
sometimes there are some). With the lack of documentation in Documentation 
directory, that means that this code is something like black box. And hard to 
learn for newcomer. Tell me if Im wrong, but isnt the open-source demand also 
to let as many people ac possible to involve in development? 

The biggest example is the "patch_update_file". Which can be divided in few 
parts. For example the "if ($line) { ..... }" big big box.
This also mean for list_and_chose and list_modified (and maybe others).

Sometimes there are perl like statements:

"something if|for|while|etc something"
and common things are written next like 
"if (something) { something }"

Is there demand to write scripts (mainly perl) like in C to keep the code more 
readable for C people or just write it more in perl style (to keep the code 
cleaner and shorter)?

Another thing is parsing command line options, why not use Getopt::Long here?



> 
> While reading the current add-i code recently, I noticed that over time
> the code quality deteriorated compared to the reasonably clean design in
> the original version, perhaps due to excessive copying and mimicing,
> especially when "Edit patch" feature was added and then more recently when
> new modes to apply patches in different directions are added to allow
> other commands like "git reset" and "git checkout" to implement their
> "--patch" options.
> 
> An example of a clean-up in the right direction may be a patch I posted a
> few days ago:
> 
>  
> http://thread.gmane.org/gmane.comp.version-control.git/170685/focus=171017
> 
> Is that the kind of "consolidation" you have in mind?

I have read that conversation before. I also tried to reproduce that bug, but 
have no success (in version 1.7.4.3). But before I read the code and try to 
find something that this can occur, you send the patch. I'm not so fast as 
you:)


> 
> Also I am a bit puzzled by the inconsistency between the various stages of
> 
> your goals.  A clearly stated primary goal is:
> > Main and final project goal is integrating fully git-add--interactive
> > into current git-add code.
> 
> but the success criteria is only about the above "This task also include"?

I will try to clear that up today, to finalize that in the meaning of doing the 
cleanup and extension part as part of GSoC and prepare the rewriting part for 
further work. I still think I can handle that and rewrite that as part of 
GSoC, but I didn't do such a big open-source project before, so I'm going to 
adopt your style of coding standards and timings. 

I also attach a example perl code I'm now writing, it is a half done(40%) data 
-> animated graph converter (part of my seminar work). 

Robert.

> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #1.2: semestralka.pl --]
[-- Type: application/x-perl, Size: 5138 bytes --]

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

  reply	other threads:[~2011-04-08  9:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26  0:41 GSOC idea: build in scripts and cleanups Robert David
2011-03-26  2:14 ` Jonathan Nieder
2011-03-26 13:39   ` Jeff King
2011-03-28  8:55     ` Robert David
2011-03-28 14:21       ` Jeff King
2011-03-30 15:39         ` Thomas Rast
2011-03-30 21:17           ` Robert David
2011-04-03 21:17           ` Robert David
2011-04-04  7:43           ` Robert David
2011-04-04 18:09             ` Junio C Hamano
2011-04-04 18:51               ` Robert David
2011-04-05 17:07               ` Jeff King
2011-04-05 18:18                 ` Junio C Hamano
2011-04-05 16:52             ` Jeff King
2011-04-05 23:27               ` Robert David
2011-04-07 13:30               ` Robert David
2011-04-07 22:19                 ` Junio C Hamano
2011-04-08  9:51                   ` Robert David [this message]
2011-04-11  6:34             ` Jonathan Nieder
2011-04-17 18:50               ` Robert David

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=201104081151.23392.robert.david.public@gmail.com \
    --to=robert.david.public@gmail.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --cc=trast@student.ethz.ch \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).