git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH] Make list of features auto-managed.
Date: Thu, 21 Jun 2007 11:55:46 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.0.99.0706211137020.20596@xanadu.home> (raw)
In-Reply-To: <7vwsxxwtrh.fsf@assigned-by-dhcp.pobox.com>

On Thu, 21 Jun 2007, Junio C Hamano wrote:

> I am now getting sort of convinced that the list-features is a
> slippery slop towards total suckage, unless managed very
> carefully.
> 
> The "auto manage" patch I am responding to would tempt anybody
> to extend the mechanism to do something like the attached patch,
> because a one-line comment near the code, like:
> 
> 	/* FEATURE<oneline-first-paragraph> */
> 
> does not look very useful nor pretty by itself in the source
> code.  It makes it very tempting to actually describe the
> "feature".  People with only half a brain would even advocate
> updating supported_features[] to a tuple of (name, explanation),
> and have "git version --list-features" to spit both out, or
> something like that.  I really do not think we would want to go
> there.
> 
> A few years down the road, do we really care if we did not do
> something long time ago, but the code was updated and added as a
> new feature?  That information belongs to the commit log, not to
> in-source comments.  This will lead to the same mistake often
> made by users of other SCMs, embedding "$Log$" in their sources.

Well, just in case my opinion matters...

I don't like this feature list idea at all.

Not only is it going to grow indefinitely with no possibility for 
garbage collection because programs will depends on particular features 
to be listed there, the simple fact that deciding if a particular 
improvement should be listed is a subjective matter which will make the 
list grow faster than it absolutely should.

Given that this appears to be needed by git-guy, and since git-guy is 
shipped with main git already, it is a bit odd to have to support code 
to work with older git versions.  Why isn't git-guy simply remaining in 
synch with the git version it is shipped with?  This way cruft won't 
accumulate forever.

And if the tool and git core really have to be decoupled, then the best 
way to test for a specific feature is actually to get the git 
version.  No silly issues with a feature list to maintain, and no issue 
with a particular feature that might not have been added to the list.  

When you need git behavior X and you know that it appeared in version Y 
then you only need to test for git_version >= Y.  Determining that 
particular Y is much easier after the facts using the commit log than 
trying to anticipate what item should be added to a feature list for 
future usage.  In fact the same argument as for not explicitly recording 
renames in commit objects should apply here.


Nicolas

  reply	other threads:[~2007-06-21 15:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-21  4:59 [PATCH] Introduce git version --list-features for porcelain use Shawn O. Pearce
2007-06-21  5:47 ` Junio C Hamano
2007-06-21  6:10   ` Shawn O. Pearce
2007-06-21  7:02     ` Junio C Hamano
2007-06-21  9:00       ` [PATCH] Make list of features auto-managed Junio C Hamano
2007-06-21  9:18         ` Junio C Hamano
2007-06-21 15:55           ` Nicolas Pitre [this message]
2007-06-21 19:32             ` Junio C Hamano
2007-06-22  3:25               ` Shawn O. Pearce
2007-06-22  3:58                 ` Junio C Hamano
2007-06-22  4:07                 ` Nicolas Pitre
2007-06-22  4:33                   ` Shawn O. Pearce
2007-06-22  5:15                     ` Nicolas Pitre
2007-06-22  9:59                     ` Josef Weidendorfer
2007-06-22 14:03                 ` Catalin Marinas
2007-06-21 11:58       ` [PATCH] Introduce git version --list-features for porcelain use Johannes Schindelin

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=alpine.LFD.0.99.0706211137020.20596@xanadu.home \
    --to=nico@cam.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    /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 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 NNTP newsgroup(s).