git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Nicolas Pitre <nico@cam.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Make list of features auto-managed.
Date: Fri, 22 Jun 2007 00:33:29 -0400	[thread overview]
Message-ID: <20070622043329.GE17393@spearce.org> (raw)
In-Reply-To: <alpine.LFD.0.99.0706212337030.20596@xanadu.home>

Nicolas Pitre <nico@cam.org> wrote:
> First of all, I mentioned at the time that using a . for separator 
> between the tagged version and the number of commits since then in the 
> git-describe output was a bad idea.  You just made the perfect 
> demonstration of that.  If it was just me I'd change that . for a + or a 
> : like the original patch did.

I preferred + as well, but we wound up with - in the final patch,
and GIT-VERSION-GEN replaces the - with a . because that makes RPM
happier or something:

  VN=$(echo "$VN" | sed -e 's/-/./g');

> Now you say that you don't want to wait for the release to happen before 
> using this cool new feature.  Well, I'd reply that life is tough.  

In comparsion to other things we all must deal with in life, this
is a cakewalk.  ;-) But yes, your point is well made.

> Either you 
> trick Junio into making a release sooner because the feature is just too 
> valuable to wait.  Or you try the feature (git-blame -w) and hope for 
> the best.  Certainly in that case you can predict the behavior of 
> older git-blame versions if you pass it -w which they don't understand?

I think that's where we are.  I can develop the feature, trick
git-gui into enabling it, but most end-users won't be able to use
it until Junio makes a 1.5.3-rc* or 1.5.3 final.  Tough for them.
Tricking Junio is very hard, he isn't easily tricked.  A good
quality for a mantainer to have.

> > I'd like to at least gracefully fail by
> > disabling an option, or suggesting the user upgrade their plumbing,
> > if an option isn't supported.
> 
> Well you should be able to just try the option and detect it when it 
> isn't supported.

Sure.

Except sometimes we have been lax about option checking and don't
always fail (though we usually do, but haven't always).  And on
Windows doing a fork+exec to poll an option is expensive.  Worse,
some options are destructive.  For example `update-ref -d`.

Should I run `update-ref -d refs/heads/master` to see if the
-d option is supported by update-ref, so that I know if I should
create a particular UI widget or not?  No, of course not.  I should
use a special temporary name, like GITGUI_TEST_FEATURE.  But now
I have to create and delete a temporary item just to decide if a
UI feature should be enabled.  And if the feature doesn't exist,
then I have to cleanup the temporary item "by hand".

Annoying.  Like this email thread I'm sure has become.
 
> > Unlike how we gracefully fail with a useful error message say
> > when an early 1.4 release that doesn't support offset deltas is
> > given a packfile with an OFS_DELTA in it (corrupt pack, recently
> > rediscussed on list).  Or when a 1.5.1 client tries to checkout
> > a tree that uses the new subproject mode in 1.5.2 (missing blob,
> > recently discussed on #git).
> 
> Those are different as you have an older version that couldn't 
> anticipate the future.  In your case you can "anticipate the past".

Yes, however my point here is that I think we have historically
been bad about making our software reasonably future-proof.

The .pack file has a version field, with value 2.  REF_DELTA is not
supported by those binaries that predated its introduction.  They are
unable to properly unpack, index or read a packfile using REF_DELTA.
Why did the .pack version stay at 2 if REF_DELTA is used in the file?

The packed-refs file was introduced without a version header
(whoops).  Later Junio had to wedge things into there in order to
get a version header of sorts so we could have the tag deref values
cached in the packed-refs.

We weren't strict enough in checking file modes in the tree parser
(yes, that was actually a real bug) but basically we didn't think
ahead to what an older binary should do when a future binary used a
file mode we didn't understand.  For example, the user setuid bit.
Or the new dirlink thing, which isn't even a valid mode in UNIX.

I think we are getting a little better at it, but in general we
have a really poor track record in this area.

-- 
Shawn.

  reply	other threads:[~2007-06-22  4:33 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
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 [this message]
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=20070622043329.GE17393@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nico@cam.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).