All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	git@vger.kernel.org, Jakub Narebski <jnareb@gmail.com>,
	"Dmitry S. Kravtsov" <idkravitz@gmail.com>,
	Shawn Pearce <spearce@spearce.org>
Subject: Re: [PATCH] cache-tree: do not cache empty trees
Date: Mon, 7 Feb 2011 19:29:33 +0700	[thread overview]
Message-ID: <AANLkTim-nbVsp8z0Cw+p67JU0B9yAE3hkaZ1ay9cmsjm@mail.gmail.com> (raw)
In-Reply-To: <20110207121855.GA7298@LK-Perkele-VI.localdomain>

On Mon, Feb 7, 2011 at 7:18 PM, Ilari Liusvaara
<ilari.liusvaara@elisanet.fi> wrote:
> On Mon, Feb 07, 2011 at 04:57:13PM +0700, Nguyen Thai Ngoc Duy wrote:
>>
>> Perhaps it's not a good approach after all. What I wanted was to make
>> pre-1.8.0 tolerate empty trees created by 1.8.0. Perhaps it's better
>> to just let pre-1.8.0 refuse to work with empty trees, forcing users
>> to upgrade to 1.8.0?
>>
>> The (untested) patch below would make git refuse to create an index
>> from a tree that contains empty trees. Hmm?
>
> Remember, many distros ship with old versions of Git. Debian stable
> is now at 1.7.2.3 (Squeeze became Debian 6.0) and it'll take years
> before next release. What about these?

Waiting a few years is my best bet :P Really I don't figure out any
other way for migration. New empty trees would end up in repository
and affect all connected clients regardless version.

> Making previous versions refuse to work with empty trees isn't exactly
> trivial, as the tree parser seems to be written to be extremely
> liberal on what it accepts.

The repository _can_ contain empty trees. The main problem is index
not supporting empty trees. I only prevent index being used. If users
create new commits (including empty trees) with mktree and
commit-tree, they can also checkout without index using ls-tree and
cat-file.
-- 
Duy

  reply	other threads:[~2011-02-07 12:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-05  8:30 [PATCH] cache-tree: do not cache empty trees Nguyễn Thái Ngọc Duy
2011-02-05  9:50 ` Nguyễn Thái Ngọc Duy
2011-02-05 10:14   ` Jonathan Nieder
2011-02-05 10:32     ` Nguyen Thai Ngoc Duy
2011-02-05 14:07   ` Nguyễn Thái Ngọc Duy
2011-02-07  2:09     ` Junio C Hamano
2011-02-07  2:36       ` Nguyen Thai Ngoc Duy
2011-02-07  8:17       ` [PATCH] correct type of EMPTY_TREE_SHA1_BIN Jonathan Nieder
2011-02-09 23:33         ` Junio C Hamano
2011-02-07  9:17     ` [PATCH] cache-tree: do not cache empty trees Jonathan Nieder
2011-02-07  9:57       ` Nguyen Thai Ngoc Duy
2011-02-07 12:18         ` Ilari Liusvaara
2011-02-07 12:29           ` Nguyen Thai Ngoc Duy [this message]
2011-02-07 12:32           ` Jonathan Nieder
2011-02-07 20:48         ` Junio C Hamano
2011-02-08  4:11           ` Nguyen Thai Ngoc Duy
2011-02-08  4:30             ` Jonathan Nieder
2011-02-15 10:19               ` Yann Dirson
2011-02-16 14:29                 ` Jakub Narebski
2011-02-08 10:40             ` Ilari Liusvaara

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=AANLkTim-nbVsp8z0Cw+p67JU0B9yAE3hkaZ1ay9cmsjm@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=idkravitz@gmail.com \
    --cc=ilari.liusvaara@elisanet.fi \
    --cc=jnareb@gmail.com \
    --cc=jrnieder@gmail.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 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.