* Re: [PATCH] contrib/vim: simplify instructions for old vim support
From: Jonathan Nieder @ 2013-01-10 23:08 UTC (permalink / raw)
To: Jeff King; +Cc: Manlio Perillo, git@vger.kernel.org, Junio C Hamano
In-Reply-To: <20130110213427.GA26138@sigill.intra.peff.net>
Jeff King wrote:
> On Thu, Jan 10, 2013 at 12:54:27PM -0800, Jonathan Nieder wrote:
>> Rely on the upstream filetype.vim instead of duplicating its rules in
>> git's instructions for syntax highlighting support on pre-7.2 vim
>> versions.
[...]
> Yeah, I think this makes sense. I'd be fine with removing it entirely,
> but it doesn't hurt to err on the conservative side and leave it there.
> It's not like it's generating a huge maintenance burden, and with your
> patch, there is even less to maintain.
>
> Acked-by: Jeff King <peff@peff.net>
Thanks for looking it over.
^ permalink raw reply
* Re: [PATCH 03/19] reset.c: pass pathspec around instead of (prefix, argv) pair
From: Junio C Hamano @ 2013-01-10 23:09 UTC (permalink / raw)
To: Duy Nguyen; +Cc: Martin von Zweigbergk, git
In-Reply-To: <CACsJy8Apu1BJ2t+vpbzpQ4Wni==Azzmp99a+TmBzR3h8qpx=8g@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
> On Thu, Jan 10, 2013 at 2:26 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Martin von Zweigbergk <martinvonz@gmail.com> writes:
>>
>>> We use the path arguments in two places in reset.c: in
>>> interactive_reset() and read_from_tree(). Both of these call
>>> get_pathspec(), so we pass the (prefix, arv) pair to both
>>> functions. Move the call to get_pathspec() out of these methods, for
>>> two reasons: 1) One argument is simpler than two. 2) It lets us use
>>> the (arguably clearer) "if (pathspec)" in place of "if (i < argc)".
>>> ---
>>> If I understand correctly, this should be rebased on top of
>>> nd/parse-pathspec. Please let me know.
>>
>> Yeah, this will conflict with the get_pathspec-to-parse_pathspec
>> conversion Duy has been working on.
>
> Or I could hold off nd/parse-pathspec if this series has a better
> chance of graduation first. Decision?
I am greedy and want to have both ;-)
Before deciding that, I'd appreciate a second set of eyes giving
Martin's series an independent review, to see if it is going in the
right direction. I think I didn't spot anything questionable in it
myself, but second opinion always helps.
There is no textual conflict between the two topics at the moment,
but because the ultimate goal of your series is to remove all uses
of the pathspec.raw[] field outside the implementation of pathspec
matching, it might help to rename the field to _private_raw (or
remove it), and either make get_pathspec() private or disappear, to
ensure that the compiler will help us catching semantic conflicts
with new users of it at a late stage of your series.
^ permalink raw reply
* Re: bugreport: stgit cannot export empty patch
From: bryanlarsen @ 2013-01-10 23:16 UTC (permalink / raw)
To: git
In-Reply-To: <xmqqboll2nl0.fsf@junio.mtv.corp.google.com>
Junio C Hamano writes:
> Stepan Koltsov <stepan.koltsov@> writes:
>> stgit fails to export empty patches:
>>
>> % stg new empty-patch -m 'asasas'
>> Now at patch "empty-patch"
>> % stg export empty-patch
>> Checking for changes in the working directory ... done
>> fatal: unrecognized input
>> stg export: git failed with code 128
>> zsh: exit 2 stg export empty-patch
>>
>> % stg --version
>> Stacked GIT 0.16-3-g67cf
>> git version 1.7.9.1
>> Python version 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
>> [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
> I don't use (or read the sources to) StGIT, but isn't the whole point of
> "stg export" to "convert your StGIT patches into patch files"? For an
> empty commit, what is an appropriate output? IOW, is it reasonable to
> have an empty commit in your history if you are planning to "stg export"
> it?
Here's another example where the functionality is useful:
https://github.com/Hobo/agility-gitorial-patches is used to build
http://cookbook.hobocentral.net/tutorials/agility
Each commit/patch becomes a step in the tutorial. Some tutorial steps don't
have any code attached to them.
In the past, an export of an empty commit would yield a patch where the last
three lines were
> ---
> 0 files changed, 0 insertions(+), 0 deletions(-)
>
The latest version of stgit along with git v1.6 eliminates the error. A
bisection identifies cc64b318f26c9e176c4f07b1a459a86e7a04c4eb as the source
of the problem.
Thanks,
Bryan
--
View this message in context: http://git.661346.n2.nabble.com/bugreport-stgit-cannot-export-empty-patch-tp7559494p7574691.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply
* Re: [PATCH 02/21] Add parse_pathspec() that converts cmdline args to struct pathspec
From: Martin von Zweigbergk @ 2013-01-10 23:26 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1357453268-12543-3-git-send-email-pclouds@gmail.com>
On Sat, Jan 5, 2013 at 10:20 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
> +
> + /* No arguments, no prefix -> no pathspec */
> + if (!entry && !prefix)
> + return;
>
> + /* No arguments with prefix -> prefix pathspec */
When working with the old get_pathspec(), I remember wondering if a
flag switching between "no argument -> prefix pathspec" and "no
argument -> no pathspec" would be worthwhile. I think e.g. 'add' and
'clean' would use the former , while 'reset' and 'commit' would use
the latter. Since you're now changing all the callers of
get_pathspec(), it seems like the perfect time to ask this question.
What do you think?
^ permalink raw reply
* [PATCH] minor diff between gitweb docs and actual template for $GIT/description
From: Tim Chase @ 2013-01-11 0:33 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
The documentation for gitweb gives one description of the default
content for the $GIT/description, the description template has other
text. One of these two patches should be applied to bring them into
order (applying both would just reverse the problem). Or, both
could be changed to the same new text.
-tkc
(not subscribed to the actual git ML, just git-users@googlegroups.com)
[-- Attachment #2: git_change_gitweb.diff --]
[-- Type: text/plain, Size: 660 bytes --]
diff --git a/Documentation/gitweb.txt b/Documentation/gitweb.txt
index 168e8bf..7c4cb69 100644
--- a/Documentation/gitweb.txt
+++ b/Documentation/gitweb.txt
@@ -227,7 +227,7 @@ description (or `gitweb.description`)::
repository). Plain text file; HTML will be escaped. By default set to
+
-------------------------------------------------------------------------------
-Unnamed repository; edit this file to name it for gitweb.
+Unnamed repository; edit this file 'description' to name the repository.
-------------------------------------------------------------------------------
+
from the template during repository creation, usually installed in
[-- Attachment #3: git_change_template.diff --]
[-- Type: text/plain, Size: 314 bytes --]
diff --git a/templates/this--description b/templates/this--description
index 498b267..c6f25e8 100644
--- a/templates/this--description
+++ b/templates/this--description
@@ -1 +1 @@
-Unnamed repository; edit this file 'description' to name the repository.
+Unnamed repository; edit this file to name it for gitweb.
^ permalink raw reply related
* Re: [PATCH] minor diff between gitweb docs and actual template for $GIT/description
From: Jonathan Nieder @ 2013-01-11 2:22 UTC (permalink / raw)
To: Tim Chase; +Cc: git, Jakub Narebski
In-Reply-To: <50EF5DC8.1000500@tim.thechases.com>
(+cc: Jakub, who maintains gitweb)
Hi Tim,
Tim Chase wrote:
> The documentation for gitweb gives one description of the default
> content for the $GIT/description, the description template has other
> text. One of these two patches should be applied to bring them into
> order (applying both would just reverse the problem). Or, both
> could be changed to the same new text.
May we have your sign-off? (See Documentation/SubmittingPatches for
what this means.)
> --- a/Documentation/gitweb.txt
> +++ b/Documentation/gitweb.txt
> @@ -227,7 +227,7 @@ description (or `gitweb.description`)::
> repository). Plain text file; HTML will be escaped. By default set to
> +
> -------------------------------------------------------------------------------
> -Unnamed repository; edit this file to name it for gitweb.
> +Unnamed repository; edit this file 'description' to name the repository.
> -------------------------------------------------------------------------------
> +
> from the template during repository creation, usually installed in
Looks sane to me. Thanks for noticing.
Regards,
Jonathan
^ permalink raw reply
* Re: [PATCH 02/21] Add parse_pathspec() that converts cmdline args to struct pathspec
From: Duy Nguyen @ 2013-01-11 2:33 UTC (permalink / raw)
To: Martin von Zweigbergk; +Cc: git
In-Reply-To: <CANiSa6iUqZ7E9NWgMfR3bUxZoyhjO2Jz+Z=yjs9vkfmbit7SOg@mail.gmail.com>
On Fri, Jan 11, 2013 at 6:26 AM, Martin von Zweigbergk
<martinvonz@gmail.com> wrote:
> On Sat, Jan 5, 2013 at 10:20 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
>> +
>> + /* No arguments, no prefix -> no pathspec */
>> + if (!entry && !prefix)
>> + return;
>>
>> + /* No arguments with prefix -> prefix pathspec */
>
> When working with the old get_pathspec(), I remember wondering if a
> flag switching between "no argument -> prefix pathspec" and "no
> argument -> no pathspec" would be worthwhile. I think e.g. 'add' and
> 'clean' would use the former , while 'reset' and 'commit' would use
> the latter. Since you're now changing all the callers of
> get_pathspec(), it seems like the perfect time to ask this question.
> What do you think?
Yes that'll simplify the call sites. Will do.
--
Duy
^ permalink raw reply
* [PATCH v2] clone: forbid --bare --separate-git-dir <dir>
From: Nguyễn Thái Ngọc Duy @ 2013-01-11 3:09 UTC (permalink / raw)
To: Jonathan Niedier
Cc: git, Junio C Hamano, Jens Lehmann, Heiko Voigt, Manlio Perillo,
W. Trevor King, Nguyễn Thái Ngọc Duy
In-Reply-To: <1357465670-32766-1-git-send-email-pclouds@gmail.com>
The --separate-git-dir option was introduced to make it simple to put
the git directory somewhere outside the worktree, for example when
cloning a repository for use as a submodule.
It was not intended for use when creating a bare repository. In that
case there is no worktree and it is more natural to directly clone the
repository and create a .git file as separate steps:
git clone --bare /path/to/repo.git bar.git
printf 'gitdir: bar.git\n' >foo.git
Forbid the combination, making the command easier to explain.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
Just reword the commit message (or copying it from Jonathan
actually). No comments about remove_junk_on_signal because we're less
likely to re-enable it again.
builtin/clone.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/builtin/clone.c b/builtin/clone.c
index ec2f75b..b30189f 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -704,6 +704,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
if (option_origin)
die(_("--bare and --origin %s options are incompatible."),
option_origin);
+ if (real_git_dir)
+ die(_("--bare and --separate-git-dir are incompatible."));
option_no_checkout = 1;
}
--
1.8.0.rc2.23.g1fb49df
^ permalink raw reply related
* Re: [PATCH v2] clone: forbid --bare --separate-git-dir <dir>
From: Junio C Hamano @ 2013-01-11 3:15 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy
Cc: Jonathan Niedier, git, Jens Lehmann, Heiko Voigt, Manlio Perillo,
W. Trevor King
In-Reply-To: <1357873799-17413-1-git-send-email-pclouds@gmail.com>
Thanks.
^ permalink raw reply
* [PATCH 1/2] fetch, upload-pack: add --no-shallow for infinite depth
From: Nguyễn Thái Ngọc Duy @ 2013-01-11 3:30 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, Stefan Beller, Jonathan Nieder, schlotter,
Ralf.Wildenhues, Nguyễn Thái Ngọc Duy
In-Reply-To: <7vy5g383sy.fsf_-_@alter.siamese.dyndns.org>
The user can do --depth=2147483647 (*) for infinite depth now. But
it's hard to remember. Any other numbers larger than the longest
commit chain in the repository would also do, but some guessing may
be involved. Make easy-to-remember --no-shallow an alias for
--depth=2147483647.
Make upload-pack recognize this special number as infinite depth. The
effect is essentially the same as before, except that upload-pack is
more efficient because it does not have to traverse to the bottom
any more. The chance of a user actually wanting exactly 2147483647
commits depth, not infinite, on a repository with a history that long,
is probably too small to consider.
(*) This is the largest positive number a 32-bit signed integer can
contain. JGit and older C Git store depth as "int" so both are OK
with this number. Dulwich does not support shallow clone.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
Documentation/fetch-options.txt | 4 ++++
Documentation/git-fetch-pack.txt | 2 ++
Documentation/technical/shallow.txt | 3 +++
builtin/fetch.c | 15 ++++++++++++++-
commit.h | 3 +++
t/t5500-fetch-pack.sh | 16 ++++++++++++++++
upload-pack.c | 13 ++++++++++---
7 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 6e98bdf..012d1b2 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -13,6 +13,10 @@
to the specified number of commits from the tip of each remote
branch history. Tags for the deepened commits are not fetched.
+--no-shallow::
+ Deepen to the roots of the repository's history (i.e. the
+ result repository is no longer shallow).
+
ifndef::git-pull[]
--dry-run::
Show what would be done, without making any changes.
diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt
index 8c75120..b81e90d 100644
--- a/Documentation/git-fetch-pack.txt
+++ b/Documentation/git-fetch-pack.txt
@@ -84,6 +84,8 @@ be in a separate packet, and the list must end with a flush packet.
--depth=<n>::
Limit fetching to ancestor-chains not longer than n.
+ 'git-upload-pack' treats the special depth 2147483647 as
+ infinite even if there is an ancestor-chain that long.
--no-progress::
Do not show the progress.
diff --git a/Documentation/technical/shallow.txt b/Documentation/technical/shallow.txt
index 0502a54..ea2f69f 100644
--- a/Documentation/technical/shallow.txt
+++ b/Documentation/technical/shallow.txt
@@ -53,3 +53,6 @@ It also writes an appropriate $GIT_DIR/shallow.
You can deepen a shallow repository with "git-fetch --depth 20
repo branch", which will fetch branch from repo, but stop at depth
20, updating $GIT_DIR/shallow.
+
+The special depth 2147483647 (or 0x7fffffff, the largest positive
+number a signed 32-bit integer can contain) means infinite depth.
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 4b5a898..bf7b5c5 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -32,7 +32,7 @@ enum {
static int all, append, dry_run, force, keep, multiple, prune, update_head_ok, verbosity;
static int progress = -1, recurse_submodules = RECURSE_SUBMODULES_DEFAULT;
-static int tags = TAGS_DEFAULT;
+static int tags = TAGS_DEFAULT, no_shallow;
static const char *depth;
static const char *upload_pack;
static struct strbuf default_rla = STRBUF_INIT;
@@ -82,6 +82,9 @@ static struct option builtin_fetch_options[] = {
OPT_BOOL(0, "progress", &progress, N_("force progress reporting")),
OPT_STRING(0, "depth", &depth, N_("depth"),
N_("deepen history of shallow clone")),
+ { OPTION_SET_INT, 0, "no-shallow", &no_shallow, NULL,
+ N_("deepen history to the bottom"),
+ PARSE_OPT_NONEG | PARSE_OPT_NOARG, NULL, 1 },
{ OPTION_STRING, 0, "submodule-prefix", &submodule_prefix, N_("dir"),
N_("prepend this to submodule path output"), PARSE_OPT_HIDDEN },
{ OPTION_STRING, 0, "recurse-submodules-default",
@@ -970,6 +973,16 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix,
builtin_fetch_options, builtin_fetch_usage, 0);
+ if (no_shallow) {
+ if (depth)
+ die(_("--depth and --no-shallow cannot be used together"));
+ else {
+ static char inf_depth[12];
+ sprintf(inf_depth, "%d", INFINITE_DEPTH);
+ depth = inf_depth;
+ }
+ }
+
if (recurse_submodules != RECURSE_SUBMODULES_OFF) {
if (recurse_submodules_default) {
int arg = parse_fetch_recurse_submodules_arg("--recurse-submodules-default", recurse_submodules_default);
diff --git a/commit.h b/commit.h
index 0f469e5..fbde106 100644
--- a/commit.h
+++ b/commit.h
@@ -162,6 +162,9 @@ extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *r
extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos, int cleanup);
extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
+/* largest postive number a signed 32-bit integer can contain */
+#define INFINITE_DEPTH 0x7fffffff
+
extern int register_shallow(const unsigned char *sha1);
extern int unregister_shallow(const unsigned char *sha1);
extern int for_each_commit_graft(each_commit_graft_fn, void *);
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 6322e8a..6a6e672 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -264,6 +264,22 @@ test_expect_success 'clone shallow object count' '
grep "^count: 52" count.shallow
'
+test_expect_success 'fetch --depth --no-shallow' '
+ (
+ cd shallow &&
+ test_must_fail git fetch --depth=1 --no-shallow
+ )
+'
+
+test_expect_success 'infinite deepening (full repo)' '
+ (
+ cd shallow &&
+ git fetch --no-shallow &&
+ git fsck --full &&
+ ! test -f .git/shallow
+ )
+'
+
test_expect_success 'clone shallow without --no-single-branch' '
git clone --depth 1 "file://$(pwd)/." shallow2
'
diff --git a/upload-pack.c b/upload-pack.c
index 6142421..88f0029 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -670,10 +670,17 @@ static void receive_needs(void)
if (depth == 0 && shallows.nr == 0)
return;
if (depth > 0) {
- struct commit_list *result, *backup;
+ struct commit_list *result = NULL, *backup = NULL;
int i;
- backup = result = get_shallow_commits(&want_obj, depth,
- SHALLOW, NOT_SHALLOW);
+ if (depth == INFINITE_DEPTH)
+ for (i = 0; i < shallows.nr; i++) {
+ struct object *object = shallows.objects[i].item;
+ object->flags |= NOT_SHALLOW;
+ }
+ else
+ backup = result =
+ get_shallow_commits(&want_obj, depth,
+ SHALLOW, NOT_SHALLOW);
while (result) {
struct object *object = &result->item->object;
if (!(object->flags & (CLIENT_SHALLOW|NOT_SHALLOW))) {
--
1.8.0.rc2.23.g1fb49df
^ permalink raw reply related
* [PATCH 2/2] upload-pack: fix off-by-one depth calculation in shallow clone
From: Nguyễn Thái Ngọc Duy @ 2013-01-11 3:30 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, Stefan Beller, Jonathan Nieder, schlotter,
Ralf.Wildenhues, Nguyễn Thái Ngọc Duy
In-Reply-To: <1357875005-21956-1-git-send-email-pclouds@gmail.com>
get_shallow_commits() is used to determine the cut points at a given
depth (i.e. the number of commits in a chain that the user likes to
get). However we count current depth up to the commit "commit" but we
do the cutting at its parents (i.e. current depth + 1). This makes
upload-pack always return one commit more than requested. This patch
fixes it.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
shallow.c | 8 +++++++-
t/t5500-fetch-pack.sh | 25 +++++++++++++++++++------
2 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/shallow.c b/shallow.c
index a0363de..6be915f 100644
--- a/shallow.c
+++ b/shallow.c
@@ -72,8 +72,14 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
}
if (parse_commit(commit))
die("invalid commit");
- commit->object.flags |= not_shallow_flag;
cur_depth++;
+ if (cur_depth >= depth) {
+ commit_list_insert(commit, &result);
+ commit->object.flags |= shallow_flag;
+ commit = NULL;
+ continue;
+ }
+ commit->object.flags |= not_shallow_flag;
for (p = commit->parents, commit = NULL; p; p = p->next) {
if (!p->item->util) {
int *pointer = xmalloc(sizeof(int));
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 6a6e672..58d3bdf 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -130,16 +130,25 @@ test_expect_success 'single given branch clone' '
test_must_fail git --git-dir=branch-a/.git rev-parse origin/B
'
+test_expect_success 'clone shallow depth 1' '
+ git clone --no-single-branch --depth 1 "file://$(pwd)/." shallow0
+ test "`git --git-dir=shallow0/.git rev-list --count HEAD`" = 1
+'
+
test_expect_success 'clone shallow' '
git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow
'
+test_expect_success 'clone shallow depth count' '
+ test "`git --git-dir=shallow/.git rev-list --count HEAD`" = 2
+'
+
test_expect_success 'clone shallow object count' '
(
cd shallow &&
git count-objects -v
) > count.shallow &&
- grep "^in-pack: 18" count.shallow
+ grep "^in-pack: 12" count.shallow
'
test_expect_success 'clone shallow object count (part 2)' '
@@ -256,12 +265,16 @@ test_expect_success 'additional simple shallow deepenings' '
)
'
+test_expect_success 'clone shallow depth count' '
+ test "`git --git-dir=shallow/.git rev-list --count HEAD`" = 11
+'
+
test_expect_success 'clone shallow object count' '
(
cd shallow &&
git count-objects -v
) > count.shallow &&
- grep "^count: 52" count.shallow
+ grep "^count: 55" count.shallow
'
test_expect_success 'fetch --depth --no-shallow' '
@@ -289,7 +302,7 @@ test_expect_success 'clone shallow object count' '
cd shallow2 &&
git count-objects -v
) > count.shallow2 &&
- grep "^in-pack: 6" count.shallow2
+ grep "^in-pack: 3" count.shallow2
'
test_expect_success 'clone shallow with --branch' '
@@ -297,7 +310,7 @@ test_expect_success 'clone shallow with --branch' '
'
test_expect_success 'clone shallow object count' '
- echo "in-pack: 6" > count3.expected &&
+ echo "in-pack: 3" > count3.expected &&
GIT_DIR=shallow3/.git git count-objects -v |
grep "^in-pack" > count3.actual &&
test_cmp count3.expected count3.actual
@@ -326,7 +339,7 @@ EOF
GIT_DIR=shallow6/.git git tag -l >taglist.actual &&
test_cmp taglist.expected taglist.actual &&
- echo "in-pack: 7" > count6.expected &&
+ echo "in-pack: 4" > count6.expected &&
GIT_DIR=shallow6/.git git count-objects -v |
grep "^in-pack" > count6.actual &&
test_cmp count6.expected count6.actual
@@ -341,7 +354,7 @@ EOF
GIT_DIR=shallow7/.git git tag -l >taglist.actual &&
test_cmp taglist.expected taglist.actual &&
- echo "in-pack: 7" > count7.expected &&
+ echo "in-pack: 4" > count7.expected &&
GIT_DIR=shallow7/.git git count-objects -v |
grep "^in-pack" > count7.actual &&
test_cmp count7.expected count7.actual
--
1.8.0.rc2.23.g1fb49df
^ permalink raw reply related
* [PATCH] cvsimport: rewrite to use cvsps 3.x to fix major bugs
From: Junio C Hamano @ 2013-01-11 3:32 UTC (permalink / raw)
To: git; +Cc: Eric S. Raymond
From: "Eric S. Raymond" <esr@thyrsus.com>
The combination of git-cvsimport and cvsps had serious problems.
Among these were:
(1) Analysis of branchy repos was buggy in multiple ways in both
programs, leading to incorrect repo translations.
(2) Even after a correct branch analysis, extra (redundant) fileops
would often be generated on the new-branch side.
(3) Inability to report more than one tag pointing to the same revision.
(4) Failure in certain cases of clock-skew reported by the t9603 test.
(5) Failure to use commitids for changeset ordering in cases were this
would have prevented clock skew from causing incorrect grouping.
Problems 2-5 and portions of problem 1 have been solved by a major
rewrite of cvsps (the 3.x release series); it now emits a git
fast-import stream. Also, the buggy attempt at ancestry-branch
tracking previously invoked by -A has been replaced with a simpler and
better topo analysis. cvsps is now about 20% smaller than formerly.
All this changed cvsps's interface enough to require a complete
rewrite of git-cvsimport (hence this patch). In the process the code
size of the wrapper script dropped by about x3 and it can now support
alternate conversion engines; the first new engine is cvs2git, with
parsecvs expected to follow shortly.
The old Perl git-cvsimport is moved to git-cvsimport-fallback; new
git-cvsimport will hand off to the fallback script when it detects
that the user has a pre-3.x cvsps. The fallback is only there so that
people with simple enough repositories that can be correctly handled
by cvsps-2.x but without the bleeding-edge cvsps 3.x installed does
not have to be left without any cvsimport that works for them (with
the same bugs and all). The fallback support will be removed after
cvsps 3.x and the rewritten cvsimport matures and gets widely
available.
This patch also removes Michael Haggerty's git-cvsimport tests
(t960[123]) from the git tree. These are actually conversion-engine
tests and have been merged into a larger cvsps test suite, which I
intend to spin out into a general CVS-lifting test that can also be
applied to utilities such as cvs2git and parsecvs. The t9604 test
will move in a future patch, when I likewise have it integrated
into the general test suite.
The following known bug has not been fixed: "If any files were ever
"cvs import"ed more than once (e.g., import of more than one vendor
release) the HEAD contains the wrong content." However, cvsps now
emits a warning in this case. There is also one pathological tagging
case that was successful in the former t9602 test that now fails
(with a warning).
I plan to address these problems. This patch at least gets the
cvsps-3.x/git-cvsimport combination to a state that is not too
broken to ship - that is, in all failure cases known to me it
now emits useful warnings rather than silently botching the
import.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
* This was (re)sent privately to me; the previous attempt by Eric
somehow did not reach the list. Let me see if I have better
luck, as we really would want to be reviewing these patches.
I rewrote one paragraph in the log about the fallback, though.
For the record the original read like this:
The old Perl git-cvsimport is moved to git-cvsimport-fallback; new
git-cvsimport will hand off to the fallback script when it detects
that the user has a pre-3.x cvsps. I make no warranties that
cvsps-2.x will actually work or do anything more useful than make
demons fly out of your nose; the fallback is only there because Junio
disliked the idea of a flag day, and should be removed after a decent
interval.
which I felt somewhat irresponsible to existing users.
Makefile | 3 +-
git-cvsimport.perl => git-cvsimport-fallback.perl | 8 +
git-cvsimport.py | 354 +++++++++++++++++++++
t/t9601/cvsroot/.gitattributes | 1 -
t/t9601/cvsroot/CVSROOT/.gitignore | 2 -
t/t9601/cvsroot/module/added-imported.txt,v | 44 ---
t/t9601/cvsroot/module/imported-anonymously.txt,v | 42 ---
.../module/imported-modified-imported.txt,v | 76 -----
t/t9601/cvsroot/module/imported-modified.txt,v | 59 ----
t/t9601/cvsroot/module/imported-once.txt,v | 43 ---
t/t9601/cvsroot/module/imported-twice.txt,v | 60 ----
t/t9602/README | 62 ----
t/t9602/cvsroot/.gitattributes | 1 -
t/t9602/cvsroot/CVSROOT/.gitignore | 2 -
t/t9602/cvsroot/module/default,v | 102 ------
t/t9602/cvsroot/module/sub1/default,v | 102 ------
t/t9602/cvsroot/module/sub1/subsubA/default,v | 101 ------
t/t9602/cvsroot/module/sub1/subsubB/default,v | 107 -------
.../module/sub2/Attic/branch_B_MIXED_only,v | 59 ----
t/t9602/cvsroot/module/sub2/default,v | 102 ------
t/t9602/cvsroot/module/sub2/subsubA/default,v | 102 ------
t/t9602/cvsroot/module/sub3/default,v | 102 ------
t/t9603/cvsroot/.gitattributes | 1 -
t/t9603/cvsroot/CVSROOT/.gitignore | 2 -
t/t9603/cvsroot/module/a,v | 74 -----
t/t9603/cvsroot/module/b,v | 90 ------
26 files changed, 364 insertions(+), 1337 deletions(-)
rename git-cvsimport.perl => git-cvsimport-fallback.perl (98%)
create mode 100755 git-cvsimport.py
delete mode 100644 t/t9601/cvsroot/.gitattributes
delete mode 100644 t/t9601/cvsroot/CVSROOT/.gitignore
delete mode 100644 t/t9601/cvsroot/module/added-imported.txt,v
delete mode 100644 t/t9601/cvsroot/module/imported-anonymously.txt,v
delete mode 100644 t/t9601/cvsroot/module/imported-modified-imported.txt,v
delete mode 100644 t/t9601/cvsroot/module/imported-modified.txt,v
delete mode 100644 t/t9601/cvsroot/module/imported-once.txt,v
delete mode 100644 t/t9601/cvsroot/module/imported-twice.txt,v
delete mode 100644 t/t9602/README
delete mode 100644 t/t9602/cvsroot/.gitattributes
delete mode 100644 t/t9602/cvsroot/CVSROOT/.gitignore
delete mode 100644 t/t9602/cvsroot/module/default,v
delete mode 100644 t/t9602/cvsroot/module/sub1/default,v
delete mode 100644 t/t9602/cvsroot/module/sub1/subsubA/default,v
delete mode 100644 t/t9602/cvsroot/module/sub1/subsubB/default,v
delete mode 100644 t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v
delete mode 100644 t/t9602/cvsroot/module/sub2/default,v
delete mode 100644 t/t9602/cvsroot/module/sub2/subsubA/default,v
delete mode 100644 t/t9602/cvsroot/module/sub3/default,v
delete mode 100644 t/t9603/cvsroot/.gitattributes
delete mode 100644 t/t9603/cvsroot/CVSROOT/.gitignore
delete mode 100644 t/t9603/cvsroot/module/a,v
delete mode 100644 t/t9603/cvsroot/module/b,v
diff --git a/Makefile b/Makefile
index 736ecd4..ca5d9e9 100644
--- a/Makefile
+++ b/Makefile
@@ -464,7 +464,7 @@ SCRIPT_PERL += git-add--interactive.perl
SCRIPT_PERL += git-difftool.perl
SCRIPT_PERL += git-archimport.perl
SCRIPT_PERL += git-cvsexportcommit.perl
-SCRIPT_PERL += git-cvsimport.perl
+SCRIPT_PERL += git-cvsimport-fallback.perl
SCRIPT_PERL += git-cvsserver.perl
SCRIPT_PERL += git-relink.perl
SCRIPT_PERL += git-send-email.perl
@@ -472,6 +472,7 @@ SCRIPT_PERL += git-svn.perl
SCRIPT_PYTHON += git-remote-testgit.py
SCRIPT_PYTHON += git-p4.py
+SCRIPT_PYTHON += git-cvsimport.py
SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
diff --git a/git-cvsimport.perl b/git-cvsimport-fallback.perl
similarity index 98%
rename from git-cvsimport.perl
rename to git-cvsimport-fallback.perl
index 0a31ebd..4bc0717 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport-fallback.perl
@@ -1,4 +1,8 @@
#!/usr/bin/perl
+# This code became obsolete in January 2013, and is retained only as a
+# fallback from git-cvsimport.py for users who have only cvsps-2.x.
+# It (and the code in cvsimport.py that calls it) should be removed
+# once the 3.x version has had a reasonable time to propagate.
# This tool is copyright (c) 2005, Matthias Urlichs.
# It is released under the Gnu Public License, version 2.
@@ -27,6 +31,10 @@
use POSIX qw(strftime tzset dup2 ENOENT);
use IPC::Open2;
+print(STDERR "You do not appear to have cvsps 3.x.\n");
+print(STDERR "Falling back to unmaintained Perl cvsimport for cvsps 2.x.\n");
+print(STDERR "Upgrade your cvsps for best results.\n");
+
$SIG{'PIPE'}="IGNORE";
set_timezone('UTC');
diff --git a/git-cvsimport.py b/git-cvsimport.py
new file mode 100755
index 0000000..129471e
--- /dev/null
+++ b/git-cvsimport.py
@@ -0,0 +1,354 @@
+#!/usr/bin/env python
+#
+# Import CVS history into git
+#
+# Intended to be a near-workalike of Matthias Urlichs's Perl implementation.
+#
+# By Eric S. Raymond <esr@thyrsus.com>, December 2012
+# May be redistributed under the license of the git project.
+
+import sys
+
+if sys.hexversion < 0x02060000:
+ sys.stderr.write("git cvsimport: requires Python 2.6 or later.\n")
+ sys.exit(1)
+
+import os, getopt, subprocess, tempfile, shutil
+
+DEBUG_COMMANDS = 1
+
+class Fatal(Exception):
+ "Unrecoverable error."
+ def __init__(self, msg):
+ Exception.__init__(self)
+ self.msg = msg
+
+def do_or_die(dcmd, legend=""):
+ "Either execute a command or raise a fatal exception."
+ if legend:
+ legend = " " + legend
+ if verbose >= DEBUG_COMMANDS:
+ sys.stdout.write("git cvsimport: executing '%s'%s\n" % (dcmd, legend))
+ try:
+ retcode = subprocess.call(dcmd, shell=True)
+ if retcode < 0:
+ raise Fatal("git cvsimport: child was terminated by signal %d." % -retcode)
+ elif retcode != 0:
+ raise Fatal("git cvsimport: child returned %d." % retcode)
+ except (OSError, IOError) as e:
+ raise Fatal("git cvsimport: execution of %s%s failed: %s" % (dcmd, legend, e))
+
+def capture_or_die(dcmd, legend=""):
+ "Either execute a command and capture its output or die."
+ if legend:
+ legend = " " + legend
+ if verbose >= DEBUG_COMMANDS:
+ sys.stdout.write("git cvsimport: executing '%s'%s\n" % (dcmd, legend))
+ try:
+ return subprocess.check_output(dcmd, shell=True)
+ except subprocess.CalledProcessError as e:
+ if e.returncode < 0:
+ sys.stderr.write("git cvsimport: child was terminated by signal %d." % -e.returncode)
+ elif e.returncode != 0:
+ sys.stderr.write("git cvsimport: child returned %d." % e.returncode)
+ sys.exit(1)
+
+class cvsps:
+ "Method class for cvsps back end."
+ def __init__(self):
+ self.opts = ""
+ self.revmap = None
+ def set_repo(self, val):
+ "Set the repository root option."
+ if not val.startswith(":"):
+ if not val.startswith(os.sep):
+ val = os.path.abspath(val)
+ val = ":local:" + val
+ self.opts += " --root '%s'" % val
+ def set_authormap(self, val):
+ "Set the author-map file."
+ self.opts += " -A '%s'" % val
+ def set_fuzz(self, val):
+ "Set the commit-similarity window."
+ self.opts += " -z %s" % val
+ def set_nokeywords(self):
+ "Suppress CVS keyword expansion."
+ self.opts += " -k"
+ def add_opts(self, val):
+ "Add options to the engine command line."
+ self.opts += " " + val
+ def set_exclusion(self, val):
+ "Set a file exclusion regexp."
+ self.opts += " -n -f '%s'" % val
+ def set_after(self, val):
+ "Set a date threshold for incremental import."
+ self.opts += " -d '%s'" % val
+ def set_revmap(self, val):
+ "Set the file to which the engine should dump a reference map."
+ self.revmap = val
+ self.opts += " -R '%s'" % self.revmap
+ def set_module(self, val):
+ "Set the module to query."
+ self.opts += " " + val
+ def command(self):
+ "Emit the command implied by all previous options."
+ return "cvsps --fast-export " + self.opts
+
+class cvs2git:
+ "Method class for cvs2git back end."
+ def __init__(self):
+ self.opts = ""
+ self.modulepath = "."
+ def set_authormap(self, _val):
+ "Set the author-map file."
+ sys.stderr.write("git cvsimport: author maping is not supported with cvs2git.\n")
+ sys.exit(1)
+ def set_repo(self, _val):
+ "Set the repository root option."
+ sys.stderr.write("git cvsimport: cvs2git must run within a repository checkout directory.\n")
+ sys.exit(1)
+ def set_fuzz(self, _val):
+ "Set the commit-similarity window."
+ sys.stderr.write("git cvsimport: fuzz setting is not supported with cvs2git.\n")
+ sys.exit(1)
+ def set_nokeywords(self):
+ "Suppress CVS keyword expansion."
+ self.opts += " --keywords-off"
+ def add_opts(self, val):
+ "Add options to the engine command line."
+ self.opts += " " + val
+ def set_exclusion(self, val):
+ "Set a file exclusion regexp."
+ self.opts += " --exclude='%s'" % val
+ def set_after(self, _val):
+ "Set a date threshold for incremental import."
+ sys.stderr.write("git cvsimport: incremental import is not supported with cvs2git.\n")
+ sys.exit(1)
+ def set_revmap(self, _val):
+ "Set the file to which the engine should dump a reference map."
+ sys.stderr.write("git cvsimport: can't get a reference map from cvs2git.\n")
+ sys.exit(1)
+ def set_module(self, val):
+ "Set the module to query."
+ self.modulepath = " " + val
+ def command(self):
+ "Emit the command implied by all previous options."
+ return "(cvs2git --username=git-cvsimport --quiet --quiet --blobfile={0} --dumpfile={1} {2} {3} && cat {0} {1} && rm {0} {1})".format(tempfile.mkstemp()[1], tempfile.mkstemp()[1], self.opts, self.modulepath)
+
+class filesource:
+ "Method class for file-source back end."
+ def __init__(self, filename):
+ self.filename = filename
+ def __complain(self, legend):
+ sys.stderr.write("git cvsimport: %s with file source.\n" % legend)
+ sys.exit(1)
+ def set_repo(self, _val):
+ "Set the repository root option."
+ self.__complain("repository can't be set")
+ def set_authormap(self, _val):
+ "Set the author-map file."
+ sys.stderr.write("git cvsimport: author mapping is not supported with filesource.\n")
+ sys.exit(1)
+ def set_fuzz(self, _val):
+ "Set the commit-similarity window."
+ self.__complain("fuzz can't be set")
+ def set_nokeywords(self, _val):
+ "Suppress CVS keyword expansion."
+ self.__complain("keyword suppression can't be set")
+ def add_opts(self, _val):
+ "Add options to the engine command line."
+ self.__complain("other options can't be set")
+ def set_exclusion(self, _val):
+ "Set a file exclusion regexp."
+ self.__complain("exclusions can't be set")
+ def set_after(self, _val):
+ "Set a date threshold for incremental import."
+ pass
+ def set_revmap(self, _val):
+ "Set the file to which the engine should dump a reference map."
+ sys.stderr.write("git cvsimport: can't get a reference map from cvs2git.\n")
+ sys.exit(1)
+ def set_module(self, _val):
+ "Set the module to query."
+ self.__complain("module can't be set")
+ def command(self):
+ "Emit the command implied by all previous options."
+ return "cat " + self.filename
+
+if __name__ == '__main__':
+ if sys.hexversion < 0x02060000:
+ sys.stderr.write("git cvsimport: requires Python 2.6 or later.\n")
+ sys.exit(1)
+ (options, arguments) = getopt.getopt(sys.argv[1:], "vbe:d:C:r:o:ikus:p:z:P:S:aL:A:Rh")
+ verbose = 0
+ bare = False
+ root = None
+ outdir = os.getcwd()
+ remotize = False
+ import_only = False
+ underscore_to_dot = False
+ slashsubst = None
+ authormap = None
+ revisionmap = False
+ backend = cvsps()
+ for (opt, val) in options:
+ if opt == '-v':
+ verbose += 1
+ elif opt == '-b':
+ bare = True
+ elif opt == '-e':
+ for cls in (cvsps, cvs2git):
+ if cls.__name__ == val:
+ backend = cls()
+ break
+ else:
+ sys.stderr.write("git cvsimport: unknown engine %s.\n" % val)
+ sys.exit(1)
+ elif opt == '-d':
+ backend.set_repo(val)
+ elif opt == '-C':
+ outdir = val
+ elif opt == '-r':
+ remotize = True
+ elif opt == '-o':
+ sys.stderr.write("git cvsimport: -o is no longer supported.\n")
+ sys.exit(1)
+ elif opt == '-i':
+ import_only = True
+ elif opt == '-k':
+ backend.set_nokeywords()
+ elif opt == '-u':
+ underscore_to_dot = True
+ elif opt == '-s':
+ slashsubst = val
+ elif opt == '-p':
+ backend.add_opts(val.replace(",", " "))
+ elif opt == '-z':
+ backend.set_fuzz(val)
+ elif opt == '-P':
+ backend = filesource(val)
+ sys.exit(1)
+ elif opt in ('-m', '-M'):
+ sys.stderr.write("git cvsimport: -m and -M are no longer supported: use reposurgeon instead.\n")
+ sys.exit(1)
+ elif opt == '-S':
+ backend.set_exclusion(val)
+ elif opt == '-a':
+ sys.stderr.write("git cvsimport: -a is no longer supported.\n")
+ sys.exit(1)
+ elif opt == '-L':
+ sys.stderr.write("git cvsimport: -L is no longer supported.\n")
+ sys.exit(1)
+ elif opt == '-A':
+ authormap = os.path.abspath(val)
+ elif opt == '-R':
+ revisionmap = True
+ else:
+ print """\
+git cvsimport [-A <author-conv-file>] [-C <git_repository>] [-b] [-d <CVSROOT>]
+ [-e engine] [-h] [-i] [-k] [-p <options-for-cvsps>] [-P <source-file>]
+ [-r <remote>] [-R] [-s <subst>] [-S <regex>] [-u] [-v] [-z <fuzz>]
+ [<CVS_module>]
+"""
+ def metadata(fn, outdir='.'):
+ if bare:
+ return os.path.join(outdir, fn)
+ else:
+ return os.path.join(outdir, ".git", fn)
+ # Ugly fallback code for people with only cvsps-2.x
+ # Added January 2013 - should be removed after a decent interval.
+ if backend.__class__.__name__ == "cvsps":
+ try:
+ subprocess.check_output("cvsps -V 2>/dev/null", shell=True)
+ except subprocess.CalledProcessError as e:
+ if e.returncode == 1:
+ sys.stderr.write("cvsimport: falling back to old version...\n")
+ sys.exit(os.system("git-cvsimport-fallback " + " ".join(sys.argv[1:])))
+ else:
+ sys.stderr.write("cvsimport: cannot execute cvsps.\n")
+ sys.exit(1)
+ # Real mainline code begins here
+ try:
+ if outdir:
+ try:
+ # If the output directory does not exist, create it
+ # and initialize it as a git repository.
+ os.mkdir(outdir)
+ do_or_die("git init --quiet " + outdir)
+ except OSError:
+ # Otherwise, assume user wants incremental import.
+ if not bare and not os.path.exists(os.path.join(outdir, ".git")):
+ raise Fatal("output directory is not a git repository")
+ threshold = capture_or_die("git log -1 --format=%ct").strip()
+ backend.set_after(threshold)
+ if revisionmap:
+ backend.set_revmap(tempfile.mkstemp()[1])
+ markmap = tempfile.mkstemp()[1]
+ if arguments:
+ backend.set_module(arguments[0])
+ gitopts = ""
+ if bare:
+ gitopts += " --bare"
+ if revisionmap:
+ gitopts += " --export-marks='%s'" % markmap
+ if authormap:
+ shutil.copyfile(authormap, metadata("cvs-authors", outdir))
+ if os.path.exists(metadata("cvs-authors", outdir)):
+ backend.set_authormap(metadata("cvs-authors", outdir))
+ do_or_die("%s | (cd %s >/dev/null; git fast-import --quiet %s)" \
+ % (backend.command(), outdir, gitopts))
+ os.chdir(outdir)
+ if underscore_to_dot or slashsubst:
+ tagnames = capture_or_die("git tag -l")
+ for tag in tagnames.split():
+ if tag:
+ changed = tag
+ if underscore_to_dot:
+ changed = changed.replace("_", ".")
+ if slashsubst:
+ changed = changed.replace(os.sep, slashsubst)
+ if changed != tag:
+ do_or_die("git tag -f %s %s >/dev/null" % (tag, changed))
+ if underscore_to_dot or slashsubst or remotize:
+ branchnames = capture_or_die("git branch -l")
+ for branch in branchnames.split():
+ if branch:
+ # Ugh - fragile dependency on branch -l output format
+ branch = branch[2:]
+ changed = branch
+ if underscore_to_dot:
+ changed = changed.replace("_", ".")
+ if slashsubst:
+ changed = changed.replace(os.sep, slashsubst)
+ if remotize:
+ changed = os.path.join("remotes", remotize, branch)
+ if changed != branch:
+ do_or_die("branch --m %s %s >/dev/null" % (branch, changed))
+ if revisionmap:
+ refd = {}
+ for line in open(backend.revmap):
+ if line.startswith("#"):
+ continue
+ (fn, rev, mark) = line.split()
+ refd[(fn, rev)] = mark
+ markd = {}
+ for line in open(markmap):
+ if line.startswith("#"):
+ continue
+ (mark, hashd) = line.split()
+ markd[mark] = hashd
+ with open(metadata("cvs-revisions"), "a") as wfp:
+ for ((fn, rev), val) in refd.items():
+ if val in markd:
+ wfp.write("%s %s %s\n" % (fn, rev, markd[val]))
+ os.remove(markmap)
+ os.remove(backend.revmap)
+ if not import_only and not bare:
+ do_or_die("git checkout -q")
+ except Fatal, err:
+ sys.stderr.write("git_cvsimport: " + err.msg + "\n")
+ sys.exit(1)
+ except KeyboardInterrupt:
+ pass
+
+# end
diff --git a/t/t9601/cvsroot/.gitattributes b/t/t9601/cvsroot/.gitattributes
deleted file mode 100644
index 562b12e..0000000
--- a/t/t9601/cvsroot/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-* -whitespace
diff --git a/t/t9601/cvsroot/CVSROOT/.gitignore b/t/t9601/cvsroot/CVSROOT/.gitignore
deleted file mode 100644
index 3bb9b34..0000000
--- a/t/t9601/cvsroot/CVSROOT/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-history
-val-tags
diff --git a/t/t9601/cvsroot/module/added-imported.txt,v b/t/t9601/cvsroot/module/added-imported.txt,v
deleted file mode 100644
index 5f83072..0000000
--- a/t/t9601/cvsroot/module/added-imported.txt,v
+++ /dev/null
@@ -1,44 +0,0 @@
-head 1.1;
-access;
-symbols
- vtag-4:1.1.1.1
- vbranchA:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.1
-date 2004.02.09.15.43.15; author kfogel; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2004.02.09.15.43.16; author kfogel; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.1
-log
-@Add a file to the working copy.
-@
-text
-@Adding this file, before importing it with different contents.
-@
-
-
-1.1.1.1
-log
-@Import (vbranchA, vtag-4).
-@
-text
-@d1 1
-a1 1
-This is vtag-4 (on vbranchA) of added-then-imported.txt.
-@
-
diff --git a/t/t9601/cvsroot/module/imported-anonymously.txt,v b/t/t9601/cvsroot/module/imported-anonymously.txt,v
deleted file mode 100644
index 55e1b0c..0000000
--- a/t/t9601/cvsroot/module/imported-anonymously.txt,v
+++ /dev/null
@@ -1,42 +0,0 @@
-head 1.1;
-branch 1.1.1;
-access;
-symbols
- vtag-1:1.1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@This is vtag-1 (on vbranchA) of imported-anonymously.txt.
-@
-
-
-1.1.1.1
-log
-@Import (vbranchA, vtag-1).
-@
-text
-@@
-
-
diff --git a/t/t9601/cvsroot/module/imported-modified-imported.txt,v b/t/t9601/cvsroot/module/imported-modified-imported.txt,v
deleted file mode 100644
index e5830ae..0000000
--- a/t/t9601/cvsroot/module/imported-modified-imported.txt,v
+++ /dev/null
@@ -1,76 +0,0 @@
-head 1.2;
-access;
-symbols
- vtag-2:1.1.1.2
- vtag-1:1.1.1.1
- vbranchA:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.2
-date 2004.02.09.15.43.14; author kfogel; state Exp;
-branches;
-next 1.1;
-
-1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches;
-next 1.1.1.2;
-
-1.1.1.2
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.2
-log
-@First regular commit, to imported-modified-imported.txt, on HEAD.
-@
-text
-@This is a modification of imported-modified-imported.txt on HEAD.
-It should supersede the version from the vendor branch.
-@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@d1 2
-a2 1
-This is vtag-1 (on vbranchA) of imported-modified-imported.txt.
-@
-
-
-1.1.1.1
-log
-@Import (vbranchA, vtag-1).
-@
-text
-@@
-
-
-1.1.1.2
-log
-@Import (vbranchA, vtag-2).
-@
-text
-@d1 1
-a1 1
-This is vtag-2 (on vbranchA) of imported-modified-imported.txt.
-@
-
-
diff --git a/t/t9601/cvsroot/module/imported-modified.txt,v b/t/t9601/cvsroot/module/imported-modified.txt,v
deleted file mode 100644
index bbcfe44..0000000
--- a/t/t9601/cvsroot/module/imported-modified.txt,v
+++ /dev/null
@@ -1,59 +0,0 @@
-head 1.2;
-access;
-symbols
- vtag-1:1.1.1.1
- vbranchA:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.2
-date 2004.02.09.15.43.14; author kfogel; state Exp;
-branches;
-next 1.1;
-
-1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.2
-log
-@Commit on HEAD.
-@
-text
-@This is a modification of imported-modified.txt on HEAD.
-It should supersede the version from the vendor branch.
-@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@d1 2
-a2 1
-This is vtag-1 (on vbranchA) of imported-modified.txt.
-@
-
-
-1.1.1.1
-log
-@Import (vbranchA, vtag-1).
-@
-text
-@@
-
-
diff --git a/t/t9601/cvsroot/module/imported-once.txt,v b/t/t9601/cvsroot/module/imported-once.txt,v
deleted file mode 100644
index c5dd82b..0000000
--- a/t/t9601/cvsroot/module/imported-once.txt,v
+++ /dev/null
@@ -1,43 +0,0 @@
-head 1.1;
-branch 1.1.1;
-access;
-symbols
- vtag-1:1.1.1.1
- vbranchA:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@This is vtag-1 (on vbranchA) of imported-once.txt.
-@
-
-
-1.1.1.1
-log
-@Import (vbranchA, vtag-1).
-@
-text
-@@
-
-
diff --git a/t/t9601/cvsroot/module/imported-twice.txt,v b/t/t9601/cvsroot/module/imported-twice.txt,v
deleted file mode 100644
index d1f3f1b..0000000
--- a/t/t9601/cvsroot/module/imported-twice.txt,v
+++ /dev/null
@@ -1,60 +0,0 @@
-head 1.1;
-branch 1.1.1;
-access;
-symbols
- vtag-2:1.1.1.2
- vtag-1:1.1.1.1
- vbranchA:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches;
-next 1.1.1.2;
-
-1.1.1.2
-date 2004.02.09.15.43.13; author kfogel; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@This is vtag-1 (on vbranchA) of imported-twice.txt.
-@
-
-
-1.1.1.1
-log
-@Import (vbranchA, vtag-1).
-@
-text
-@@
-
-
-1.1.1.2
-log
-@Import (vbranchA, vtag-2).
-@
-text
-@d1 1
-a1 1
-This is vtag-2 (on vbranchA) of imported-twice.txt.
-@
-
-
diff --git a/t/t9602/README b/t/t9602/README
deleted file mode 100644
index c231e0f..0000000
--- a/t/t9602/README
+++ /dev/null
@@ -1,62 +0,0 @@
-This repository is for testing the ability to group revisions
-correctly along tags and branches. Here is its history:
-
- 1. The initial import (revision 1.1 of everybody) created a
- directory structure with a file named `default' in each dir:
-
- ./
- default
- sub1/default
- subsubA/default
- subsubB/default
- sub2/default
- subsubA/default
- sub3/default
-
- 2. Then tagged everyone with T_ALL_INITIAL_FILES.
-
- 3. Then tagged everyone except sub1/subsubB/default with
- T_ALL_INITIAL_FILES_BUT_ONE.
-
- 4. Then created branch B_FROM_INITIALS on everyone.
-
- 5. Then created branch B_FROM_INITIALS_BUT_ONE on everyone except
- /sub1/subsubB/default.
-
- 6. Then committed modifications to two files: sub3/default, and
- sub1/subsubA/default.
-
- 7. Then committed a modification to all 7 files.
-
- 8. Then backdated sub3/default to revision 1.2, and
- sub2/subsubA/default to revision 1.1, and tagged with T_MIXED.
-
- 9. Same as 8, but tagged with -b to create branch B_MIXED.
-
- 10. Switched the working copy to B_MIXED, and added
- sub2/branch_B_MIXED_only. (That's why the RCS file is in
- sub2/Attic/ -- it never existed on trunk.)
-
- 11. In one commit, modified default, sub1/default, and
- sub2/subsubA/default, on branch B_MIXED.
-
- 12. Did "cvs up -A" on sub2/default, then in one commit, made a
- change to sub2/default and sub2/branch_B_MIXED_only. So this
- commit should be spread between the branch and the trunk.
-
- 13. Do "cvs up -A" to get everyone back to trunk, then make a new
- branch B_SPLIT on everyone except sub1/subsubB/default,v.
-
- 14. Switch to branch B_SPLIT (see sub1/subsubB/default disappear)
- and commit a change that affects everyone except sub3/default.
-
- 15. An hour or so later, "cvs up -A" to get sub1/subsubB/default
- back, then commit a change on that file, on trunk. (It's
- important that this change happened after the previous commits
- on B_SPLIT.)
-
- 16. Branch sub1/subsubB/default to B_SPLIT, then "cvs up -r B_SPLIT"
- to switch the whole working copy to the branch.
-
- 17. Commit a change on B_SPLIT, to sub1/subsubB/default and
- sub3/default.
diff --git a/t/t9602/cvsroot/.gitattributes b/t/t9602/cvsroot/.gitattributes
deleted file mode 100644
index 562b12e..0000000
--- a/t/t9602/cvsroot/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-* -whitespace
diff --git a/t/t9602/cvsroot/CVSROOT/.gitignore b/t/t9602/cvsroot/CVSROOT/.gitignore
deleted file mode 100644
index 3bb9b34..0000000
--- a/t/t9602/cvsroot/CVSROOT/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-history
-val-tags
diff --git a/t/t9602/cvsroot/module/default,v b/t/t9602/cvsroot/module/default,v
deleted file mode 100644
index 3b68382..0000000
--- a/t/t9602/cvsroot/module/default,v
+++ /dev/null
@@ -1,102 +0,0 @@
-head 1.2;
-access;
-symbols
- B_SPLIT:1.2.0.4
- B_MIXED:1.2.0.2
- T_MIXED:1.2
- B_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4
- B_FROM_INITIALS:1.1.1.1.0.2
- T_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1
- T_ALL_INITIAL_FILES:1.1.1.1
- vendortag:1.1.1.1
- vendorbranch:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.2
-date 2003.05.23.00.17.53; author jrandom; state Exp;
-branches
- 1.2.2.1
- 1.2.4.1;
-next 1.1;
-
-1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches;
-next ;
-
-1.2.2.1
-date 2003.05.23.00.31.36; author jrandom; state Exp;
-branches;
-next ;
-
-1.2.4.1
-date 2003.06.03.03.20.31; author jrandom; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.2
-log
-@Second commit to proj, affecting all 7 files.
-@
-text
-@This is the file `default' in the top level of the project.
-
-Every directory in the `proj' project has a file named `default'.
-
-This line was added in the second commit (affecting all 7 files).
-@
-
-
-1.2.4.1
-log
-@First change on branch B_SPLIT.
-
-This change excludes sub3/default, because it was not part of this
-commit, and sub1/subsubB/default, which is not even on the branch yet.
-@
-text
-@a5 2
-
-First change on branch B_SPLIT.
-@
-
-
-1.2.2.1
-log
-@Modify three files, on branch B_MIXED.
-@
-text
-@a5 2
-
-This line was added on branch B_MIXED only (affecting 3 files).
-@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@d4 2
-@
-
-
-1.1.1.1
-log
-@Initial import.
-@
-text
-@@
diff --git a/t/t9602/cvsroot/module/sub1/default,v b/t/t9602/cvsroot/module/sub1/default,v
deleted file mode 100644
index b7fdccd..0000000
--- a/t/t9602/cvsroot/module/sub1/default,v
+++ /dev/null
@@ -1,102 +0,0 @@
-head 1.2;
-access;
-symbols
- B_SPLIT:1.2.0.4
- B_MIXED:1.2.0.2
- T_MIXED:1.2
- B_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4
- B_FROM_INITIALS:1.1.1.1.0.2
- T_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1
- T_ALL_INITIAL_FILES:1.1.1.1
- vendortag:1.1.1.1
- vendorbranch:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.2
-date 2003.05.23.00.17.53; author jrandom; state Exp;
-branches
- 1.2.2.1
- 1.2.4.1;
-next 1.1;
-
-1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches;
-next ;
-
-1.2.2.1
-date 2003.05.23.00.31.36; author jrandom; state Exp;
-branches;
-next ;
-
-1.2.4.1
-date 2003.06.03.03.20.31; author jrandom; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.2
-log
-@Second commit to proj, affecting all 7 files.
-@
-text
-@This is sub1/default.
-
-Every directory in the `proj' project has a file named `default'.
-
-This line was added in the second commit (affecting all 7 files).
-@
-
-
-1.2.4.1
-log
-@First change on branch B_SPLIT.
-
-This change excludes sub3/default, because it was not part of this
-commit, and sub1/subsubB/default, which is not even on the branch yet.
-@
-text
-@a5 2
-
-First change on branch B_SPLIT.
-@
-
-
-1.2.2.1
-log
-@Modify three files, on branch B_MIXED.
-@
-text
-@a5 2
-
-This line was added on branch B_MIXED only (affecting 3 files).
-@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@d4 2
-@
-
-
-1.1.1.1
-log
-@Initial import.
-@
-text
-@@
diff --git a/t/t9602/cvsroot/module/sub1/subsubA/default,v b/t/t9602/cvsroot/module/sub1/subsubA/default,v
deleted file mode 100644
index 472b7b2..0000000
--- a/t/t9602/cvsroot/module/sub1/subsubA/default,v
+++ /dev/null
@@ -1,101 +0,0 @@
-head 1.3;
-access;
-symbols
- B_SPLIT:1.3.0.4
- B_MIXED:1.3.0.2
- T_MIXED:1.3
- B_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4
- B_FROM_INITIALS:1.1.1.1.0.2
- T_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1
- T_ALL_INITIAL_FILES:1.1.1.1
- vendortag:1.1.1.1
- vendorbranch:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.3
-date 2003.05.23.00.17.53; author jrandom; state Exp;
-branches
- 1.3.4.1;
-next 1.2;
-
-1.2
-date 2003.05.23.00.15.26; author jrandom; state Exp;
-branches;
-next 1.1;
-
-1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches;
-next ;
-
-1.3.4.1
-date 2003.06.03.03.20.31; author jrandom; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.3
-log
-@Second commit to proj, affecting all 7 files.
-@
-text
-@This is sub1/subsubA/default.
-
-Every directory in the `proj' project has a file named `default'.
-
-This line was added by the first commit (affecting two files).
-
-This line was added in the second commit (affecting all 7 files).
-@
-
-
-1.3.4.1
-log
-@First change on branch B_SPLIT.
-
-This change excludes sub3/default, because it was not part of this
-commit, and sub1/subsubB/default, which is not even on the branch yet.
-@
-text
-@a7 2
-
-First change on branch B_SPLIT.
-@
-
-
-1.2
-log
-@First commit to proj, affecting two files.
-@
-text
-@d6 2
-@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@d4 2
-@
-
-
-1.1.1.1
-log
-@Initial import.
-@
-text
-@@
diff --git a/t/t9602/cvsroot/module/sub1/subsubB/default,v b/t/t9602/cvsroot/module/sub1/subsubB/default,v
deleted file mode 100644
index fe6efa4..0000000
--- a/t/t9602/cvsroot/module/sub1/subsubB/default,v
+++ /dev/null
@@ -1,107 +0,0 @@
-head 1.3;
-access;
-symbols
- B_SPLIT:1.3.0.2
- B_MIXED:1.2.0.2
- T_MIXED:1.2
- B_FROM_INITIALS:1.1.1.1.0.2
- T_ALL_INITIAL_FILES:1.1.1.1
- vendortag:1.1.1.1
- vendorbranch:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.3
-date 2003.06.03.04.29.14; author jrandom; state Exp;
-branches
- 1.3.2.1;
-next 1.2;
-
-1.2
-date 2003.05.23.00.17.53; author jrandom; state Exp;
-branches;
-next 1.1;
-
-1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches;
-next ;
-
-1.3.2.1
-date 2003.06.03.04.33.13; author jrandom; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.3
-log
-@A trunk change to sub1/subsubB/default. This was committed about an
-hour after an earlier change that affected most files on branch
-B_SPLIT. This file is not on that branch yet, but after this commit,
-we'll branch to B_SPLIT, albeit rooted in a revision that didn't exist
-at the time the rest of B_SPLIT was created.
-@
-text
-@This is sub1/subsubB/default.
-
-Every directory in the `proj' project has a file named `default'.
-
-This line was added in the second commit (affecting all 7 files).
-
-This bit was committed on trunk about an hour after an earlier change
-to everyone else on branch B_SPLIT. Afterwards, we'll finally branch
-this file to B_SPLIT, but rooted in a revision that didn't exist at
-the time the rest of B_SPLIT was created.
-@
-
-
-1.3.2.1
-log
-@This change affects sub3/default and sub1/subsubB/default, on branch
-B_SPLIT. Note that the latter file did not even exist on this branch
-until after some other files had had revisions committed on B_SPLIT.
-@
-text
-@a10 4
-
-This change affects sub3/default and sub1/subsubB/default, on branch
-B_SPLIT. Note that the latter file did not even exist on this branch
-until after some other files had had revisions committed on B_SPLIT.
-@
-
-
-1.2
-log
-@Second commit to proj, affecting all 7 files.
-@
-text
-@d6 5
-@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@d4 2
-@
-
-
-1.1.1.1
-log
-@Initial import.
-@
-text
-@@
diff --git a/t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v b/t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v
deleted file mode 100644
index 34c9789..0000000
--- a/t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v
+++ /dev/null
@@ -1,59 +0,0 @@
-head 1.1;
-access;
-symbols
- B_MIXED:1.1.0.2;
-locks; strict;
-comment @# @;
-
-
-1.1
-date 2003.05.23.00.25.26; author jrandom; state dead;
-branches
- 1.1.2.1;
-next ;
-
-1.1.2.1
-date 2003.05.23.00.25.26; author jrandom; state Exp;
-branches;
-next 1.1.2.2;
-
-1.1.2.2
-date 2003.05.23.00.48.51; author jrandom; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.1
-log
-@file branch_B_MIXED_only was initially added on branch B_MIXED.
-@
-text
-@@
-
-
-1.1.2.1
-log
-@Add a file on branch B_MIXED.
-@
-text
-@a0 1
-This file was added on branch B_MIXED. It never existed on trunk.
-@
-
-
-1.1.2.2
-log
-@A single commit affecting one file on branch B_MIXED and one on trunk.
-@
-text
-@a1 3
-
-The same commit added these two lines here on branch B_MIXED, and two
-similar lines to ./default on trunk.
-@
-
-
diff --git a/t/t9602/cvsroot/module/sub2/default,v b/t/t9602/cvsroot/module/sub2/default,v
deleted file mode 100644
index 018f7f8..0000000
--- a/t/t9602/cvsroot/module/sub2/default,v
+++ /dev/null
@@ -1,102 +0,0 @@
-head 1.3;
-access;
-symbols
- B_SPLIT:1.3.0.2
- B_MIXED:1.2.0.2
- T_MIXED:1.2
- B_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4
- B_FROM_INITIALS:1.1.1.1.0.2
- T_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1
- T_ALL_INITIAL_FILES:1.1.1.1
- vendortag:1.1.1.1
- vendorbranch:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.3
-date 2003.05.23.00.48.51; author jrandom; state Exp;
-branches
- 1.3.2.1;
-next 1.2;
-
-1.2
-date 2003.05.23.00.17.53; author jrandom; state Exp;
-branches;
-next 1.1;
-
-1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches;
-next ;
-
-1.3.2.1
-date 2003.06.03.03.20.31; author jrandom; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.3
-log
-@A single commit affecting one file on branch B_MIXED and one on trunk.
-@
-text
-@This is sub2/default.
-
-Every directory in the `proj' project has a file named `default'.
-
-This line was added in the second commit (affecting all 7 files).
-
-The same commit added these two lines here on trunk, and two similar
-lines to ./branch_B_MIXED_only on branch B_MIXED.
-@
-
-
-1.3.2.1
-log
-@First change on branch B_SPLIT.
-
-This change excludes sub3/default, because it was not part of this
-commit, and sub1/subsubB/default, which is not even on the branch yet.
-@
-text
-@a8 2
-
-First change on branch B_SPLIT.
-@
-
-
-1.2
-log
-@Second commit to proj, affecting all 7 files.
-@
-text
-@d6 3
-@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@d4 2
-@
-
-
-1.1.1.1
-log
-@Initial import.
-@
-text
-@@
diff --git a/t/t9602/cvsroot/module/sub2/subsubA/default,v b/t/t9602/cvsroot/module/sub2/subsubA/default,v
deleted file mode 100644
index d13242c..0000000
--- a/t/t9602/cvsroot/module/sub2/subsubA/default,v
+++ /dev/null
@@ -1,102 +0,0 @@
-head 1.2;
-access;
-symbols
- B_SPLIT:1.2.0.2
- B_MIXED:1.1.0.2
- T_MIXED:1.1
- B_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4
- B_FROM_INITIALS:1.1.1.1.0.2
- T_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1
- T_ALL_INITIAL_FILES:1.1.1.1
- vendortag:1.1.1.1
- vendorbranch:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.2
-date 2003.05.23.00.17.53; author jrandom; state Exp;
-branches
- 1.2.2.1;
-next 1.1;
-
-1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches
- 1.1.1.1
- 1.1.2.1;
-next ;
-
-1.1.1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches;
-next ;
-
-1.1.2.1
-date 2003.05.23.00.31.36; author jrandom; state Exp;
-branches;
-next ;
-
-1.2.2.1
-date 2003.06.03.03.20.31; author jrandom; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.2
-log
-@Second commit to proj, affecting all 7 files.
-@
-text
-@This is sub2/subsub2/default.
-
-Every directory in the `proj' project has a file named `default'.
-
-This line was added in the second commit (affecting all 7 files).
-@
-
-
-1.2.2.1
-log
-@First change on branch B_SPLIT.
-
-This change excludes sub3/default, because it was not part of this
-commit, and sub1/subsubB/default, which is not even on the branch yet.
-@
-text
-@a5 2
-
-First change on branch B_SPLIT.
-@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@d4 2
-@
-
-
-1.1.2.1
-log
-@Modify three files, on branch B_MIXED.
-@
-text
-@a3 2
-
-This line was added on branch B_MIXED only (affecting 3 files).
-@
-
-
-1.1.1.1
-log
-@Initial import.
-@
-text
-@@
diff --git a/t/t9602/cvsroot/module/sub3/default,v b/t/t9602/cvsroot/module/sub3/default,v
deleted file mode 100644
index 88e4567..0000000
--- a/t/t9602/cvsroot/module/sub3/default,v
+++ /dev/null
@@ -1,102 +0,0 @@
-head 1.3;
-access;
-symbols
- B_SPLIT:1.3.0.2
- B_MIXED:1.2.0.2
- T_MIXED:1.2
- B_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4
- B_FROM_INITIALS:1.1.1.1.0.2
- T_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1
- T_ALL_INITIAL_FILES:1.1.1.1
- vendortag:1.1.1.1
- vendorbranch:1.1.1;
-locks; strict;
-comment @# @;
-
-
-1.3
-date 2003.05.23.00.17.53; author jrandom; state Exp;
-branches
- 1.3.2.1;
-next 1.2;
-
-1.2
-date 2003.05.23.00.15.26; author jrandom; state Exp;
-branches;
-next 1.1;
-
-1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches
- 1.1.1.1;
-next ;
-
-1.1.1.1
-date 2003.05.22.23.20.19; author jrandom; state Exp;
-branches;
-next ;
-
-1.3.2.1
-date 2003.06.03.04.33.13; author jrandom; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.3
-log
-@Second commit to proj, affecting all 7 files.
-@
-text
-@This is sub3/default.
-
-Every directory in the `proj' project has a file named `default'.
-
-This line was added by the first commit (affecting two files).
-
-This line was added in the second commit (affecting all 7 files).
-@
-
-
-1.3.2.1
-log
-@This change affects sub3/default and sub1/subsubB/default, on branch
-B_SPLIT. Note that the latter file did not even exist on this branch
-until after some other files had had revisions committed on B_SPLIT.
-@
-text
-@a7 4
-
-This change affects sub3/default and sub1/subsubB/default, on branch
-B_SPLIT. Note that the latter file did not even exist on this branch
-until after some other files had had revisions committed on B_SPLIT.
-@
-
-
-1.2
-log
-@First commit to proj, affecting two files.
-@
-text
-@d6 2
-@
-
-
-1.1
-log
-@Initial revision
-@
-text
-@d4 2
-@
-
-
-1.1.1.1
-log
-@Initial import.
-@
-text
-@@
diff --git a/t/t9603/cvsroot/.gitattributes b/t/t9603/cvsroot/.gitattributes
deleted file mode 100644
index 562b12e..0000000
--- a/t/t9603/cvsroot/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-* -whitespace
diff --git a/t/t9603/cvsroot/CVSROOT/.gitignore b/t/t9603/cvsroot/CVSROOT/.gitignore
deleted file mode 100644
index 3bb9b34..0000000
--- a/t/t9603/cvsroot/CVSROOT/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-history
-val-tags
diff --git a/t/t9603/cvsroot/module/a,v b/t/t9603/cvsroot/module/a,v
deleted file mode 100644
index ba8fd5a..0000000
--- a/t/t9603/cvsroot/module/a,v
+++ /dev/null
@@ -1,74 +0,0 @@
-head 1.2;
-access;
-symbols
- A:1.2.0.2;
-locks; strict;
-comment @# @;
-
-
-1.2
-date 2009.02.21.18.11.14; author tester; state Exp;
-branches
- 1.2.2.1;
-next 1.1;
-
-1.1
-date 2009.02.21.18.11.43; author tester; state Exp;
-branches;
-next ;
-
-1.2.2.1
-date 2009.03.11.19.03.52; author tester; state Exp;
-branches;
-next 1.2.2.2;
-
-1.2.2.2
-date 2009.03.11.19.09.10; author tester; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.2
-log
-@Rev 2
-@
-text
-@1.2
-@
-
-
-1.2.2.1
-log
-@Rev 4 Branch A
-@
-text
-@d1 1
-a1 1
-1.2.2.1
-@
-
-
-1.2.2.2
-log
-@Rev 5 Branch A
-@
-text
-@d1 1
-a1 1
-1.2.2.2
-@
-
-
-1.1
-log
-@Rev 1
-@
-text
-@d1 1
-a1 1
-1.1
-@
diff --git a/t/t9603/cvsroot/module/b,v b/t/t9603/cvsroot/module/b,v
deleted file mode 100644
index d268855..0000000
--- a/t/t9603/cvsroot/module/b,v
+++ /dev/null
@@ -1,90 +0,0 @@
-head 1.3;
-access;
-symbols
- A:1.2.0.2;
-locks; strict;
-comment @# @;
-
-
-1.3
-date 2009.03.11.19.05.08; author tester; state Exp;
-branches;
-next 1.2;
-
-1.2
-date 2009.02.21.18.11.43; author tester; state Exp;
-branches
- 1.2.2.1;
-next 1.1;
-
-1.1
-date 2009.02.21.18.11.14; author tester; state Exp;
-branches;
-next ;
-
-1.2.2.1
-date 2009.03.11.19.03.52; author tester; state Exp;
-branches;
-next 1.2.2.2;
-
-1.2.2.2
-date 2009.03.11.19.09.10; author tester; state Exp;
-branches;
-next ;
-
-
-desc
-@@
-
-
-1.3
-log
-@Rev 4
-@
-text
-@1.3
-@
-
-
-1.2
-log
-@Rev 3
-@
-text
-@d1 1
-a1 1
-1.2
-@
-
-
-1.2.2.1
-log
-@Rev 4 Branch A
-@
-text
-@d1 1
-a1 1
-1.2.2.1
-@
-
-
-1.2.2.2
-log
-@Rev 5 Branch A
-@
-text
-@d1 1
-a1 1
-1.2
-@
-
-
-1.1
-log
-@Rev 2
-@
-text
-@d1 1
-a1 1
-1.1
-@
--
1.8.1.407.g59f98af
^ permalink raw reply related
* Suggestion: add option in git-p4 to preserve user in Git repository
From: Olivier Delalleau @ 2013-01-11 3:38 UTC (permalink / raw)
To: git
Hi,
I'm in a situation where I don't have P4 admin rights to use the
--preserve-user option of git-p4. However, I would like to keep user
information in the associated Git branch.
Would it be possible to add an option for this?
Thanks,
-=- Olivier
^ permalink raw reply
* Re: [PATCH 1/2] fetch, upload-pack: add --no-shallow for infinite depth
From: Junio C Hamano @ 2013-01-11 3:55 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy
Cc: git, Stefan Beller, Jonathan Nieder, schlotter, Ralf.Wildenhues
In-Reply-To: <1357875005-21956-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> The user can do --depth=2147483647 (*) for infinite depth now. But
> it's hard to remember. Any other numbers larger than the longest
> commit chain in the repository would also do, but some guessing may
> be involved. Make easy-to-remember --no-shallow an alias for
> --depth=2147483647.
I think "no shallow" makes sense in a much more important way than
"infinite depth", and this patch is a good idea for a reason
entirely different from the justification your log message makes ;-)
We explain that "clone --depth=<number>" is a way to end up with a
partial repository that contains only the recent history, and while
this may give users a smaller repository, in return the result will
be a "shallow repository" with certain limitations (i.e. fetching or
cloning from such a repository will be refused).
We also explain that the reason to use --depth=<number> is to grab
some history behind what you originally acquired into your "shallow
repository" so that you have deeper history than your original
"shallow repository".
A reader who does not know how this shallowness is implemented
cannot be blamed if she thinks the shallowness is a permanent
attribute of a repository, and once a repository is tainted by
shallowness, it cannot be wiped away by deepening it, because
nowhere in the documentation we say the "shallowness" will go away
once you grabbed enough number of older commits with it.
Calling the option "--no-shallow" (or even better, "--unshallow",
meaning "make it a repository that is no longer shallow") makes it
crystal clear that the option is about wiping away the shallowness.
Of course, the result has to contain an untruncted history, but that
is a mere side effect and an implementation detail from the end
user's point of view.
> Make upload-pack recognize this special number as infinite depth. The
> effect is essentially the same as before, except that upload-pack is
> more efficient because it does not have to traverse to the bottom
> any more. The chance of a user actually wanting exactly 2147483647
> commits depth, not infinite, on a repository with a history that long,
> is probably too small to consider.
>
> (*) This is the largest positive number a 32-bit signed integer can
> contain. JGit and older C Git store depth as "int" so both are OK
> with this number. Dulwich does not support shallow clone.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> Documentation/fetch-options.txt | 4 ++++
> Documentation/git-fetch-pack.txt | 2 ++
> Documentation/technical/shallow.txt | 3 +++
> builtin/fetch.c | 15 ++++++++++++++-
> commit.h | 3 +++
> t/t5500-fetch-pack.sh | 16 ++++++++++++++++
> upload-pack.c | 13 ++++++++++---
> 7 files changed, 52 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
> index 6e98bdf..012d1b2 100644
> --- a/Documentation/fetch-options.txt
> +++ b/Documentation/fetch-options.txt
> @@ -13,6 +13,10 @@
> to the specified number of commits from the tip of each remote
> branch history. Tags for the deepened commits are not fetched.
>
> +--no-shallow::
> + Deepen to the roots of the repository's history (i.e. the
> + result repository is no longer shallow).
> +
Mentioning both is a good thing, but I think "no longer shallow" is
more important aspect of this operation than "deepen to the roots".
> diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
> index 6322e8a..6a6e672 100755
> --- a/t/t5500-fetch-pack.sh
> +++ b/t/t5500-fetch-pack.sh
> @@ -264,6 +264,22 @@ test_expect_success 'clone shallow object count' '
> grep "^count: 52" count.shallow
> '
>
> +test_expect_success 'fetch --depth --no-shallow' '
> + (
> + cd shallow &&
> + test_must_fail git fetch --depth=1 --no-shallow
> + )
> +'
> +
> +test_expect_success 'infinite deepening (full repo)' '
> + (
> + cd shallow &&
> + git fetch --no-shallow &&
> + git fsck --full &&
> + ! test -f .git/shallow
This looks as if fsck is what removes .git/shallow but I do not
think that is what is being tested...
> diff --git a/upload-pack.c b/upload-pack.c
> index 6142421..88f0029 100644
> --- a/upload-pack.c
> +++ b/upload-pack.c
> @@ -670,10 +670,17 @@ static void receive_needs(void)
> if (depth == 0 && shallows.nr == 0)
> return;
> if (depth > 0) {
> - struct commit_list *result, *backup;
> + struct commit_list *result = NULL, *backup = NULL;
> int i;
> - backup = result = get_shallow_commits(&want_obj, depth,
> - SHALLOW, NOT_SHALLOW);
> + if (depth == INFINITE_DEPTH)
> + for (i = 0; i < shallows.nr; i++) {
> + struct object *object = shallows.objects[i].item;
> + object->flags |= NOT_SHALLOW;
> + }
> + else
> + backup = result =
> + get_shallow_commits(&want_obj, depth,
> + SHALLOW, NOT_SHALLOW);
Nice. Thanks.
^ permalink raw reply
* Re: [PATCH] minor diff between gitweb docs and actual template for $GIT/description
From: Tim Chase @ 2013-01-11 4:25 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, Jakub Narebski
In-Reply-To: <20130111022200.GH30784@google.com>
On 01/10/13 20:22, Jonathan Nieder wrote:
> (+cc: Jakub, who maintains gitweb)
> Hi Tim,
>
> Tim Chase wrote:
>
>> The documentation for gitweb gives one description of the default
>> content for the $GIT/description, the description template has other
>> text. One of these two patches should be applied to bring them into
>> order (applying both would just reverse the problem). Or, both
>> could be changed to the same new text.
>
> May we have your sign-off? (See Documentation/SubmittingPatches for
> what this means.)
Hahahahah...a one liner doc-fix copy/pasting code from one place in
the codebase to another? If you need it, you've got it:
For my one line diff:
Signed-off-by: Tim Chase <git@tim.thechases.com>
Otherwise, consider my contribution CC0 or public domain or whatever
suits you best. Or take my patch as a bug report and "make" the fix
yourself. :-)
The patches should have been based off the master branch of
github.com/git/git, FWIW.
-tkc
@gumnos
^ permalink raw reply
* Re: [PATCH 2/2] upload-pack: fix off-by-one depth calculation in shallow clone
From: Junio C Hamano @ 2013-01-11 4:26 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy
Cc: git, Stefan Beller, Jonathan Nieder, schlotter, Ralf.Wildenhues
In-Reply-To: <1357875005-21956-2-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> get_shallow_commits() is used to determine the cut points at a given
> depth (i.e. the number of commits in a chain that the user likes to
> get). However we count current depth up to the commit "commit" but we
> do the cutting at its parents (i.e. current depth + 1). This makes
> upload-pack always return one commit more than requested. This patch
> fixes it.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> shallow.c | 8 +++++++-
> t/t5500-fetch-pack.sh | 25 +++++++++++++++++++------
> 2 files changed, 26 insertions(+), 7 deletions(-)
>
> diff --git a/shallow.c b/shallow.c
> index a0363de..6be915f 100644
> --- a/shallow.c
> +++ b/shallow.c
> @@ -72,8 +72,14 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
> }
> if (parse_commit(commit))
> die("invalid commit");
> - commit->object.flags |= not_shallow_flag;
> cur_depth++;
> + if (cur_depth >= depth) {
> + commit_list_insert(commit, &result);
> + commit->object.flags |= shallow_flag;
> + commit = NULL;
> + continue;
> + }
> + commit->object.flags |= not_shallow_flag;
> for (p = commit->parents, commit = NULL; p; p = p->next) {
> if (!p->item->util) {
> int *pointer = xmalloc(sizeof(int));
Nice. No protocol extensions, you update the server side, and an
old client starts getting the right number of generations.
> diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
> index 6a6e672..58d3bdf 100755
> --- a/t/t5500-fetch-pack.sh
> +++ b/t/t5500-fetch-pack.sh
> @@ -130,16 +130,25 @@ test_expect_success 'single given branch clone' '
> test_must_fail git --git-dir=branch-a/.git rev-parse origin/B
> '
>
> +test_expect_success 'clone shallow depth 1' '
> + git clone --no-single-branch --depth 1 "file://$(pwd)/." shallow0
> + test "`git --git-dir=shallow0/.git rev-list --count HEAD`" = 1
> +'
No &&-chaining?
Thanks.
^ permalink raw reply
* [PATCH 0/3] fixup remaining cvsimport tests
From: Chris Rorvick @ 2013-01-11 4:27 UTC (permalink / raw)
To: git; +Cc: Eric S. Raymond, Chris Rorvick
These patchs apply on top of of Eric Raymond's cvsimport patch. 7 of 15
tests in t9600 fail, one of which is fixed w/ a cvsps patch I've sent
to Eric (fixes revision map.) It no longer uses "origin" as the default
branch which I suspect is a problem for at least some of the remaining
tests. Both of the t9604 tests pass.
Chris
Chris Rorvick (3):
t/lib-cvs.sh: allow cvsps version 3.x.
t9600: fixup for new cvsimport
t9604: fixup for new cvsimport
t/lib-cvs.sh | 2 +-
t/t9600-cvsimport.sh | 10 ++++------
t/t9604-cvsimport-timestamps.sh | 5 ++---
3 files changed, 7 insertions(+), 10 deletions(-)
--
1.8.1.1.g220e17a
^ permalink raw reply
* [PATCH 1/3] t/lib-cvs.sh: allow cvsps version 3.x.
From: Chris Rorvick @ 2013-01-11 4:27 UTC (permalink / raw)
To: git; +Cc: Eric S. Raymond, Chris Rorvick
In-Reply-To: <1357878439-27500-1-git-send-email-chris@rorvick.com>
---
t/lib-cvs.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh
index 44263ad..b55e861 100644
--- a/t/lib-cvs.sh
+++ b/t/lib-cvs.sh
@@ -15,7 +15,7 @@ export CVS
cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`
case "$cvsps_version" in
-2.1 | 2.2*)
+2.1 | 2.2* | 3.*)
;;
'')
skip_all='skipping cvsimport tests, cvsps not found'
--
1.8.1.1.g220e17a
^ permalink raw reply related
* [PATCH 2/3] t9600: fixup for new cvsimport
From: Chris Rorvick @ 2013-01-11 4:27 UTC (permalink / raw)
To: git; +Cc: Eric S. Raymond, Chris Rorvick
In-Reply-To: <1357878439-27500-1-git-send-email-chris@rorvick.com>
---
t/t9600-cvsimport.sh | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 4c384ff..14f54d5 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -44,7 +44,7 @@ EOF
test_expect_success PERL 'import a trivial module' '
- git cvsimport -a -R -z 0 -C module-git module &&
+ git cvsimport -R -z 0 -C module-git module &&
test_cmp module-cvs/o_fortuna module-git/o_fortuna
'
@@ -90,8 +90,7 @@ test_expect_success PERL 'update git module' '
(cd module-git &&
git config cvsimport.trackRevisions true &&
- git cvsimport -a -z 0 module &&
- git merge origin
+ git cvsimport -z 0 module
) &&
test_cmp module-cvs/o_fortuna module-git/o_fortuna
@@ -119,8 +118,7 @@ test_expect_success PERL 'cvsimport.module config works' '
(cd module-git &&
git config cvsimport.module module &&
git config cvsimport.trackRevisions true &&
- git cvsimport -a -z0 &&
- git merge origin
+ git cvsimport -z0
) &&
test_cmp module-cvs/tick module-git/tick
@@ -140,7 +138,7 @@ test_expect_success PERL 'import from a CVS working tree' '
$CVS co -d import-from-wt module &&
(cd import-from-wt &&
git config cvsimport.trackRevisions false &&
- git cvsimport -a -z0 &&
+ git cvsimport -z0 &&
echo 1 >expect &&
git log -1 --pretty=format:%s%n >actual &&
test_cmp actual expect
--
1.8.1.1.g220e17a
^ permalink raw reply related
* [PATCH 3/3] t9604: fixup for new cvsimport
From: Chris Rorvick @ 2013-01-11 4:27 UTC (permalink / raw)
To: git; +Cc: Eric S. Raymond, Chris Rorvick
In-Reply-To: <1357878439-27500-1-git-send-email-chris@rorvick.com>
---
t/t9604-cvsimport-timestamps.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/t/t9604-cvsimport-timestamps.sh b/t/t9604-cvsimport-timestamps.sh
index 1fd5142..b1629b6 100755
--- a/t/t9604-cvsimport-timestamps.sh
+++ b/t/t9604-cvsimport-timestamps.sh
@@ -7,8 +7,7 @@ setup_cvs_test_repository t9604
test_expect_success 'check timestamps are UTC (TZ=CST6CDT)' '
- TZ=CST6CDT git cvsimport -p"-x" -C module-1 module &&
- git cvsimport -p"-x" -C module-1 module &&
+ TZ=CST6CDT git cvsimport -C module-1 module &&
(
cd module-1 &&
git log --format="%s %ai"
@@ -42,7 +41,7 @@ test_expect_success 'check timestamps with author-specific timezones' '
user3=User Three <user3@domain.org> EST5EDT
user4=User Four <user4@domain.org> MST7MDT
EOF
- git cvsimport -p"-x" -A cvs-authors -C module-2 module &&
+ git cvsimport -A cvs-authors -C module-2 module &&
(
cd module-2 &&
git log --format="%s %ai %an"
--
1.8.1.1.g220e17a
^ permalink raw reply related
* Turning a complete repository to a shallow one
From: Duy Nguyen @ 2013-01-11 4:40 UTC (permalink / raw)
To: Git Mailing List
Apparently we could do it:
git clone --single-branch git.git
cd git
git tag -l|xargs git tag -d
git fetch --depth=1 origin master
git repack -ad
Now the repository becomes shallow and all of history is _lost_. It is
a feature for those who wants to reduce disk usage, but it's also a
gun to shoot at your feet. I'm tempted to ban this case. If I want to
reduce disk usage, I should be forced to shallow clone it first, then
remove the original repository. I still have a complete repository if
I change my mind. And "rm -rf git" is alarming enough for me to think
it twice before executing.
Comments?
--
Duy
^ permalink raw reply
* Re: Turning a complete repository to a shallow one
From: Junio C Hamano @ 2013-01-11 4:53 UTC (permalink / raw)
To: Duy Nguyen; +Cc: Git Mailing List
In-Reply-To: <CACsJy8Bv+AfDbttFdJ5a0PaoMrMtv1seda7VqLpfdevR4BMj4A@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
> Apparently we could do it:
>
> git clone --single-branch git.git
> cd git
> git tag -l|xargs git tag -d
> git fetch --depth=1 origin master
> git repack -ad
I may have been unclear in the earlier message, but this is one of
the reasons why I think "fetch --depth" is misadvertised (it says
"deepen the history", when the real thing it does is to truncate to
the new depth counting from the updated tip), and misdesigned (it
forces the user to guess what the new depth should be). It should
be advertised correctly, as a way to reset its depth starting from
the current history (and of course --depth=1 is truncates).
We should introduce a separate "fetch --deepen" that does what
normal people would want (see my earlier message with ASCII art).
^ permalink raw reply
* Re: [PATCH 09/19] reset.c: replace switch by if-else
From: Martin von Zweigbergk @ 2013-01-11 6:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vhamq5e1v.fsf@alter.siamese.dyndns.org>
On Wed, Jan 9, 2013 at 11:53 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Martin von Zweigbergk <martinvonz@gmail.com> writes:
>
>> ---
>> builtin/reset.c | 13 +++----------
>> 1 file changed, 3 insertions(+), 10 deletions(-)
>>
>> diff --git a/builtin/reset.c b/builtin/reset.c
>> index 42d1563..05ccfd4 100644
>> --- a/builtin/reset.c
>> +++ b/builtin/reset.c
>> @@ -351,18 +351,11 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
>> * saving the previous head in ORIG_HEAD before. */
>> update_ref_status = update_refs(rev, sha1);
>>
>> - switch (reset_type) {
>> - case HARD:
>> - if (!update_ref_status && !quiet)
>> - print_new_head_line(commit);
>> - break;
>> - case SOFT: /* Nothing else to do. */
>> - break;
>> - case MIXED: /* Report what has not been updated. */
>> + if (reset_type == HARD && !update_ref_status && !quiet)
>> + print_new_head_line(commit);
>> + else if (reset_type == MIXED) /* Report what has not been updated. */
>> update_index_refresh(0, NULL,
>> quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);
>> - break;
>> - }
>
> Justification?
Clairvoyance -- the HARD case will soon be the only non-empty case.
It's also missing KEEP and MERGE (but the empty SOFT block is there).
I'll update the message. I will also move the patch a little later in
the series, closer to where it will be useful.
^ permalink raw reply
* Fwd: git checkout doesn't work?
From: Ishayahu Lastov @ 2013-01-11 6:46 UTC (permalink / raw)
To: git
In-Reply-To: <CAJ52sWkhQDhaZxjp4vxdwSX8HGYMqaXW=gZ-d6atUDKSjHg=yw@mail.gmail.com>
This is my session on Win7 x64:
Microsoft Windows [Version 6.1.7601]
(c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены.
C:\Dropbox\Dropbox\Wesnoth\Apocryphs>cd Apokryphs.Orks
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks>git status
# On branch master
# Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: scenarios/01_NothernVillage.cfg
#
no changes added to commit (use "git add" and/or "git commit -a")
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks>cd scenarios
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks\scenarios>git status
# On branch master
# Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: 01_NothernVillage.cfg
#
no changes added to commit (use "git add" and/or "git commit -a")
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks\scenarios>git checkout -- 01
_NothernVillage.cfg
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks\scenarios>git status
# On branch master
# Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: 01_NothernVillage.cfg
#
no changes added to commit (use "git add" and/or "git commit -a")
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks\scenarios>
As I understand after last "git checkout" in "git status" I should see
that I gave no changes. It looks like an bug, isn't it?
--
сохраняйте, пожалуйста, при ответе исходный текст письма
С уважением,
начальник отдела технической поддержки
Московского Еврейского Общинного Центра
Ишаяу Ластов
телефон: +7-495-645-05-16
моб : +7-901-569-81-86
с 12 до 18, с воскресенья по четверг
^ permalink raw reply
* git checkout bug on Win7 x64
From: Ishayahu Lastov @ 2013-01-11 7:30 UTC (permalink / raw)
To: git
This is my session on Win7 x64:
Microsoft Windows [Version 6.1.7601]
(c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены.
C:\Dropbox\Dropbox\Wesnoth\Apocryphs>cd Apokryphs.Orks
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks>git status
# On branch master
# Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: scenarios/01_NothernVillage.cfg
#
no changes added to commit (use "git add" and/or "git commit -a")
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks>cd scenarios
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks\scenarios>git status
# On branch master
# Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: 01_NothernVillage.cfg
#
no changes added to commit (use "git add" and/or "git commit -a")
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks\scenarios>git checkout -- 01
_NothernVillage.cfg
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks\scenarios>git status
# On branch master
# Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: 01_NothernVillage.cfg
#
no changes added to commit (use "git add" and/or "git commit -a")
C:\Dropbox\Dropbox\Wesnoth\Apocryphs\Apokryphs.Orks\scenarios>
As I understand after last "git checkout" in "git status" I should see
that I gave no changes. It looks like an bug, isn't it?
--
сохраняйте, пожалуйста, при ответе исходный текст письма
С уважением,
начальник отдела технической поддержки
Московского Еврейского Общинного Центра
Ишаяу Ластов
телефон: +7-495-645-05-16
моб : +7-901-569-81-86
с 12 до 18, с воскресенья по четверг
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox