All of lore.kernel.org
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Jeff King <peff@peff.net>
Cc: Felipe Contreras <felipe.contreras@gmail.com>,
	git@vger.kernel.org, Sverre Rabbelier <srabbelier@gmail.com>
Subject: Re: What's cooking in git.git (Nov 2012, #02; Fri, 9)
Date: Sat, 10 Nov 2012 13:32:50 +0100	[thread overview]
Message-ID: <20121110123250.GR12052@goldbirke> (raw)
In-Reply-To: <20121110003331.GA12567@sigill.intra.peff.net>

Hi,

On Fri, Nov 09, 2012 at 07:33:31PM -0500, Jeff King wrote:
> On Sat, Nov 10, 2012 at 12:21:48AM +0100, Felipe Contreras wrote:
> > > * fc/completion-test-simplification (2012-10-29) 2 commits
> > >  - completion: simplify __gitcomp test helper
> > >  - completion: refactor __gitcomp related tests
> > >
> > >  Clean up completion tests.
> > >
> > >  There were some comments on the list.
> > >
> > >  Expecting a re-roll.
> > 
> > The second patch I can re-roll, but the first patch needs some
> > external input. My preference is that tests should also be simple and
> > maintainable, SZEDER's preference is that tests are better being
> > explicit and verbose (even if harder to maintain) to minimize possible
> > issues in the tests.
> 
> I think it is better to keep the tests simple and maintainable.

Maintainable?  There is nothing to maintain here.  Users' completion
scripts depend on __gitcomp(), so its behavior shouldn't be changed.
It can only be extended by a fifth parameter or by quoting words when
necessary, but these future changes must not alter the current
behavior checked by these tests, therefore even then these tests must
be left intact.

Simple?  Currently you only need to look at __gitcomp() and the test
itself to understand what's going on.  With this series you'll also
need to look at test_gitcomp(), figure out what its parameters are
supposed to mean, and possibly get puzzled on the way why __gitcomp()
is now seemingly called with only one parameter.

So, I don't see much benefit in this series (except the part to use
print_comp instead of "change IFS && echo", but that's already done in
this patch:
http://article.gmane.org/gmane.comp.version-control.git/207927).

OTOH, this series has some serious drawbacks.

It makes debugging more difficult.  While working on the quoting
issues I managed to break completion tests many-many times lately.  In
normal tests I could add a few debugging instructions to the failed
test to find out where the breakage lies, without affecting other
tests.  However, if the failed test uses the test_completion() helper,
then I have to add debugging instructions to test_completion() itself,
too.  This is bad, because many tests use this helper function and are
therefore affected by the debugging instructions, producing truckloads
of output making it difficult to dig out the relevant parts, or, worse
yet, causing breakages in other tests.  With this series the same
difficulties will come to __gitcomp() tests, too.

It can also encourage writing bad tests, similar to those that managed
to cram many test_completion() lines into a single tests, giving me
headaches to figure out what went wrong this time.


Best,
Gábor

  parent reply	other threads:[~2012-11-10 12:33 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-09 19:23 What's cooking in git.git (Nov 2012, #02; Fri, 9) Jeff King
2012-11-09 20:01 ` Ralf Thielow
2012-11-09 20:06   ` Ralf Thielow
2012-11-09 20:10     ` Jeff King
2012-11-09 20:27       ` Junio C Hamano
2012-11-10  0:38         ` Jeff King
2012-11-10 17:14           ` Junio C Hamano
2012-11-09 21:52 ` Kalle Olavi Niemitalo
2012-11-10 15:52   ` Paul Fox
2012-11-10 19:32     ` Kalle Olavi Niemitalo
2012-11-10 21:12       ` Andreas Schwab
2012-11-10 22:08       ` Paul Fox
2012-11-11  7:02         ` Kalle Olavi Niemitalo
2012-11-11  8:58           ` Andreas Schwab
2012-11-11 15:48           ` Jeff King
2012-11-11 16:31             ` [PATCH 0/5] ignore SIGINT while editor runs Jeff King
2012-11-11 16:55               ` [PATCH 1/5] launch_editor: refactor to use start/finish_command Jeff King
2012-11-11 16:55               ` [PATCH 2/5] launch_editor: ignore SIGINT while the editor has control Paul Fox
2012-11-12 17:44                 ` Junio C Hamano
2012-11-12 19:47                   ` Jeff King
2012-11-11 16:55               ` [PATCH 3/5] run-command: drop silent_exec_failure arg from wait_or_whine Jeff King
2012-11-11 18:13                 ` Felipe Contreras
2012-11-11 16:56               ` [PATCH 4/5] run-command: do not warn about child death by SIGINT Jeff King
2012-11-11 16:57               ` [PATCH 5/5] launch_editor: propagate SIGINT from editor to git Jeff King
2012-11-11 19:48                 ` Johannes Sixt
2012-11-30 20:24                   ` Jeff King
2012-11-11 16:58               ` [PATCH 2/5] launch_editor: ignore SIGINT while the editor has control Jeff King
2012-11-11 18:27               ` [PATCH 0/5] ignore SIGINT while editor runs Paul Fox
2012-11-11 19:15               ` Krzysztof Mazur
2012-11-11 20:24                 ` Paul Fox
2012-11-11 20:43                   ` Krzysztof Mazur
2012-11-11 22:08                     ` Andreas Schwab
2012-11-09 23:21 ` What's cooking in git.git (Nov 2012, #02; Fri, 9) Felipe Contreras
2012-11-10  0:33   ` Jeff King
2012-11-10  0:44     ` Felipe Contreras
2012-11-10 12:32     ` SZEDER Gábor [this message]
2012-11-10 19:13       ` Felipe Contreras
2012-11-10 19:56       ` Junio C Hamano

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=20121110123250.GR12052@goldbirke \
    --to=szeder@ira.uka.de \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=srabbelier@gmail.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.