All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, <git@vger.kernel.org>
Subject: Re: What's cooking in git.git (Apr 2013, #05; Mon, 15)
Date: Tue, 16 Apr 2013 11:59:31 +0200	[thread overview]
Message-ID: <8761zm4wzg.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <CAMP44s3NE3yrQoa1nZXAgy3KFXGF56Ki8icJ2z2TDigzax0nWg@mail.gmail.com> (Felipe Contreras's message of "Mon, 15 Apr 2013 18:30:45 -0500")

Felipe Contreras <felipe.contreras@gmail.com> writes:

> Clearly, that's the correct behavior. Why would anybody send a change
> that does something other than the correct behavior?

Along the same lines, why would anyone write broken code?  Nobody does,
right?

If anyone reads that commit message in more than a few weeks, then it's
because some of the code is *broken*.  So the reader is investigating a
situation where there must be a flaw somewhere, and trying to pin down
the source.  Having access to the thinking behind each commit means s/he
can more easily verify whether that thinking was correct and still
applies.

And your commit messages do nothing towards that end.


A cursory look^W^Wreview of the messages in fc/remote-hg:

    remote-hg: fix bad file paths
    
    Mercurial allows absolute file paths, and Git doesn't like that.

Only describes the problem; no reasoning as to what the chosen solution
is or why it is correct.  (I can at least infer the former from the
code, but not the latter.)

    remote-hg: show more proper errors
    
    When cloning or pushing fails, we don't want to show a stack-trace.

So what do we show?

It also seems that you do not actually use the import you add, or do
you?

    remote-hg: force remote push
    
    Ideally we shouldn't do this, as it's not recommended in mercurial
    documentation, but there's no other way to push multiple bookmarks (on
    the same branch), which would be the behavior most similar to git.
    
    At the same time, add a configuration option for the people that don't
    want to risk creating new remote heads.

This one, for a change, says what it does but doesn't say what problem
it fixes.

I'll refrain from commenting on all the one-line messages, and just
point at this one:

    remote-hg: trivial test cleanups

In $DAYJOB the advice is to avoid "trivial" (and similarly "obvious"):
either it *is* trivial, in which case you don't need to point that out,
or you're just trying to handwave over the fact that it's not.  Like
this:

 git_clone () {
-       hg -R $1 bookmark -f -r tip master &&
        git clone -q "hg::$PWD/$1" $2
 }

Not knowing the code I can only conjecture, but surely there was a
reason that the hg call lived in a function called git_clone?  And
surely there must be a good reason why it is no longer needed?


My personal favorite however is this one:

    remote-bzr: improve tag handling
    
    revision_history() is deprecated and doesn't do what we want (revno
    instead of dotted_revno?).

I don't even know how to parse that question mark.  Does it actually ask
a question?  Does it mean to imply, by the intonation suggested by a
question mark, "how could anyone ever have been so silly as to use a
revno instead of a dotted_revno"?


By the way, it's easy to find similarly helpful messages in git.git in
the old days.  One that I remember stumbling across was:

    Add the --color-words option to the diff options family
    
    With this option, the changed words are shown inline. For example,
    if a file containing "This is foo" is changed to "This is bar", the diff
    will now show "This is " in plain text, "foo" in red, and "bar" in green.

How could it not be obvious how it achieves this to anyone who has read
the ~170 lines of code it adds?

Luckily *that* code was correct and feature-complete right from the
start, so nobody ever had to actually read it to figure out what's going
on.

But that was back in 2006.  I should think that git.git has improved
since; when I wrote my first patches in 2008, I was impressed with the
readable history and extensive reviews.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  parent reply	other threads:[~2013-04-16  9:59 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 20:28 What's cooking in git.git (Apr 2013, #05; Mon, 15) Junio C Hamano
2013-04-15 22:24 ` Felipe Contreras
2013-04-15 23:14   ` Junio C Hamano
2013-04-15 23:30     ` Felipe Contreras
2013-04-16  4:12       ` Junio C Hamano
2013-04-16  5:32         ` Felipe Contreras
2013-04-16  9:59       ` Thomas Rast [this message]
2013-04-16 19:04         ` Felipe Contreras
2013-04-16 19:19           ` Junio C Hamano
2013-04-16 19:48             ` Felipe Contreras
2013-04-16 22:34               ` Phil Hord
2013-04-16 23:50                 ` Felipe Contreras
2013-04-16 22:45           ` Phil Hord
2013-04-17  4:44             ` Junio C Hamano
2013-04-17 18:50             ` Felipe Contreras
2013-04-17 23:56               ` Junio C Hamano
2013-04-18  3:59                 ` Felipe Contreras
2013-04-18  7:44                   ` Matthieu Moy
2013-04-18  9:15                     ` Felipe Contreras
2013-04-18  9:19               ` Ramkumar Ramachandra
2013-04-18  9:53                 ` Felipe Contreras
2013-04-18 10:27                   ` Ramkumar Ramachandra
2013-04-18 10:55                     ` Felipe Contreras
2013-04-18 11:31                       ` Ramkumar Ramachandra
2013-04-18 12:05                         ` Felipe Contreras
2013-04-18 11:46                       ` Ramkumar Ramachandra
2013-04-18 12:16                         ` Felipe Contreras
2013-04-23 18:49                           ` Ramkumar Ramachandra
2013-04-23 19:11                             ` Felipe Contreras
2013-04-18 20:06               ` Phil Hord
2013-04-18 23:48                 ` Felipe Contreras
2013-04-19 21:07                   ` Phil Hord
2013-04-20  1:29                     ` Felipe Contreras
2013-04-15 23:25 ` Jeff King
2013-04-15 23:49   ` Øyvind A. Holm
2013-04-16  0:53     ` Jeff King
2013-04-16  0:30   ` Jeff King
2013-04-16  1:08     ` Eric Sunshine
2013-04-16 17:18     ` Junio C Hamano
2013-04-16  3:21 ` Drew Northup
2013-04-16 23:52 ` "What's cooking" between #05 and #06 Junio C Hamano
2013-04-17  8:40   ` John Keeping
2013-04-17 15:30     ` Junio C Hamano
2013-04-17 21:25   ` Jens Lehmann
2013-04-18  8:49     ` John Keeping
2013-04-17  8:49 ` What's cooking in git.git (Apr 2013, #05; Mon, 15) Lukas Fleischer
2013-04-17 15:11   ` Junio C Hamano
2013-04-17  9:47 ` Thomas Rast
2013-04-17 15:24   ` Junio C Hamano
2013-04-17 15:56     ` Thomas Rast
2013-04-17 17:08       ` Junio C Hamano
2013-04-17 18:14         ` Junio C Hamano
2013-04-17 20:10           ` Jeff King
2013-04-18  1:39             ` Junio C Hamano
2013-04-18  1:47               ` [PATCH] git add <pathspec>... defaults to "-A" Junio C Hamano
2013-04-18 17:27               ` What's cooking in git.git (Apr 2013, #05; Mon, 15) Jeff King
2013-04-18 17:51                 ` Junio C Hamano
2013-04-18 18:00                   ` Jeff King
2013-04-18 18:16                     ` Junio C Hamano
2013-04-18 20:30                       ` Jeff King
2013-04-18 21:37                         ` Junio C Hamano
2013-04-18 21:44                           ` Jeff King
2013-04-18 22:10                             ` Junio C Hamano
2013-04-19  4:14                               ` Jeff King
2013-04-19  4:31                               ` Jonathan Nieder
2013-04-19 17:25                                 ` Junio C Hamano
2013-04-19 21:34                                   ` Jeff King
2013-04-19 21:56                                     ` Junio C Hamano
2013-04-21  7:39                                     ` jc/add-2.0-delete-default (Re: What's cooking in git.git (Apr 2013, #05; Mon, 15)) Jonathan Nieder
2013-04-22  1:51                                       ` Junio C Hamano
2013-04-22  4:54                                         ` Junio C Hamano
2013-04-22 20:43                                           ` [PATCH 0/2] "git add -A/--no-all" finishing touches Junio C Hamano
2013-04-22 20:43                                             ` [PATCH 1/2] git add: --ignore-removal is a better named --no-all Junio C Hamano
2013-04-22 20:43                                             ` [PATCH 2/2] git add: rephrase -A/--no-all warning Junio C Hamano
2013-04-22 22:41                                             ` [PATCH 3/2] git add <pathspec>... defaults to "-A" Junio C Hamano
2013-04-23  0:42                                               ` Eric Sunshine
2013-04-25 23:06                                             ` [PATCH 0/2] "git add -A/--no-all" finishing touches Junio C Hamano
2013-04-25 23:19                                               ` Junio C Hamano
2013-04-25 23:24                                                 ` Jonathan Nieder
2013-04-25 23:41                                                   ` Junio C Hamano
2013-04-25 23:44                                                     ` Junio C Hamano
2013-04-25 23:56                                                       ` Jonathan Nieder
2013-04-26  0:14                                                         ` Junio C Hamano
2013-04-26 20:44                                                           ` Junio C Hamano
2013-04-26 21:30                                                             ` Jonathan Nieder

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=8761zm4wzg.fsf@linux-k42r.v.cablecom.net \
    --to=trast@inf.ethz.ch \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.