From: Junio C Hamano <gitster@pobox.com>
To: Nanako Shiraishi <nanako3@lavabit.com>
Cc: Jakub Narebski <jnareb@gmail.com>,
Johannes Sixt <j.sixt@viscovery.net>,
Sverre Rabbelier <srabbelier@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] read-tree: at least one tree-ish argument is required
Date: Fri, 18 Dec 2009 20:43:52 -0800 [thread overview]
Message-ID: <7veimrmv3r.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20091219122509.6117@nanako3.lavabit.com> (Nanako Shiraishi's message of "Sat\, 19 Dec 2009 12\:25\:09 +0900")
Nanako Shiraishi <nanako3@lavabit.com> writes:
> Quoting Junio C Hamano <gitster@pobox.com>
>
>> Come back with a proof that there has never existed any script that uses
>> "read-tree" without arguments to purge the index, and I'd immediately
>> accept and apply the patch to retroactively forbid what the implementation
>> has allowed users to do for a long time.
>
> For what it's worth, I compiled the very first version of git
>
> commit e83c5163316f89bfbde7d9ab23ca2e25604af290
> Author: Linus Torvalds <torvalds@ppc970.osdl.org>
> Date: Thu Apr 7 15:13:13 2005 -0700
>
> Initial revision of "git", the information manager from hell
>
> and its read-tree fails with
>
> read-tree: read-tree <key>
>
> Is it a proof enough?
Ok, that initial one was "read a single tree to populate the index".
I consider it a fundamentally different program from "read-tree" as we
know now, which was introduced by d99082e (Make "read-tree" merge the
trees it reads by giving them consecutive states., 2005-04-15). Ever
since that "multi-stage" version, read-tree was "starting from an empty
index, read these trees into stages #1, #2, ..." And even that version
called the program "read-tree", not "git read-tree". IOW, "git read-tree"
never had that "no tree is an error" restriction during its entire life.
Having said all that, I don't care that deeply either way myself.
As read-tree is a very basic and low-level Porcelain, if somebody were
using it to empty the index in an existing script, this change would
appear as a regression and hopefully will be caught eventually, and
updating such a script can be made reasonably easy if we want to be
helpful (the error message can suggest running "rm $GIT_DIR/index", for
example).
next prev parent reply other threads:[~2009-12-19 4:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 8:42 [PATCH 1/2] filter-branch: remove an unnecessary use of 'git read-tree' Johannes Sixt
2009-12-15 8:43 ` [PATCH 2/2] read-tree: at least one tree-ish argument is required Johannes Sixt
2009-12-18 9:51 ` Johannes Sixt
2009-12-18 18:11 ` Junio C Hamano
2009-12-18 19:04 ` Johannes Sixt
2009-12-18 19:24 ` Sverre Rabbelier
2009-12-18 19:32 ` Junio C Hamano
2009-12-18 19:37 ` Sverre Rabbelier
2009-12-18 19:49 ` Junio C Hamano
2009-12-18 19:59 ` Sverre Rabbelier
2009-12-18 20:13 ` Junio C Hamano
2009-12-18 20:21 ` Sverre Rabbelier
2009-12-18 22:04 ` Johannes Sixt
2009-12-18 22:17 ` Jakub Narebski
2009-12-18 23:46 ` Junio C Hamano
2009-12-19 3:25 ` Nanako Shiraishi
2009-12-19 4:43 ` Junio C Hamano [this message]
2009-12-19 4:53 ` Junio C Hamano
2009-12-19 10:56 ` Johannes Schindelin
2009-12-15 17:19 ` [PATCH 1/2] filter-branch: remove an unnecessary use of 'git read-tree' Johannes Schindelin
2009-12-16 0:19 ` 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=7veimrmv3r.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=jnareb@gmail.com \
--cc=nanako3@lavabit.com \
--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 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).