From: Dmitry Ivankov <divanorama@gmail.com>
To: git@vger.kernel.org
Cc: Jonathan Nieder <jrnieder@gmail.com>, Jeff King <peff@peff.net>,
Sverre Rabbelier <srabbelier@gmail.com>,
Shawn Pearce <spearce@spearce.org>,
Dmitry Ivankov <divanorama@gmail.com>
Subject: [PATCH/RFC v2 0/3] fast-import: disallow empty branches as parents
Date: Wed, 27 Jun 2012 23:40:22 +0600 [thread overview]
Message-ID: <1340818825-13754-1-git-send-email-divanorama@gmail.com> (raw)
This is a rewrite of [1].
First of all the patch is split into several parts now.
1/3 prevents writing invalid commit objects (with null_sha1 parents)
For 2/3 and 3/3 I've changed my mind almost completely. The commands
in question are:
A 'from null_sha1'
B 'from empty_branch'
C 'from itself'
D 'merge null_sha1'
E 'merge empty_branch'
F 'merge itself'
Currently C is disallowed, D and E lead to 1/3 bug, F looks broken, A and B are allowed.
In [1] I kept A allowed, but made B, C, D, E disallowed and "fixed" F.
The idea was too keep A as legacy, fix F as it may have applications and disallow others
as they look like errors in import stream.
This time I keep A and B allowed, allow D and E, disallow F.
Now I think of null_sha1 as of a special feature, empty_branch things as a mix of legacy
and this feature (one can 'reset' branch to null_sha1, then use it's name and expect it
to work as if null_sha1 was used, and null_sha1 is allowed). "Fix" for F is dropped for
now and will later go separately with it's own set of tests and a new discussion I guess.
[1] http://thread.gmane.org/gmane.comp.version-control.git/200339
Dmitry Ivankov (3):
fast-import: do not write null_sha1 as a merge parent
fast-import: allow "merge $null_sha1" command
fast-import: disallow "merge $itself" command
fast-import.c | 29 +++++++++++++++++++----------
t/t9300-fast-import.sh | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 10 deletions(-)
--
1.7.3.4
next reply other threads:[~2012-06-27 17:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-27 17:40 Dmitry Ivankov [this message]
2012-06-27 17:40 ` [PATCH v2 1/3] fast-import: do not write null_sha1 as a merge parent Dmitry Ivankov
2012-06-27 21:25 ` Jonathan Nieder
2012-07-24 19:30 ` Jonathan Nieder
2012-06-27 17:40 ` [PATCH v2 2/3] fast-import: allow "merge $null_sha1" command Dmitry Ivankov
2012-06-27 21:33 ` Jonathan Nieder
2012-06-27 22:30 ` Junio C Hamano
2012-06-27 23:39 ` Jonathan Nieder
2012-07-23 1:28 ` Jonathan Nieder
2012-06-27 17:40 ` [PATCH v2 3/3] fast-import: disallow "merge $itself" command Dmitry Ivankov
2012-06-27 21:22 ` Jonathan Nieder
2012-07-24 19:40 ` 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=1340818825-13754-1-git-send-email-divanorama@gmail.com \
--to=divanorama@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=spearce@spearce.org \
--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).