* [PATCH 1/4] test-suite: adding a test for fast-export with tag variants
@ 2009-03-30 9:08 Erik Faye-Lund
2009-03-30 9:08 ` [PATCH 2/4] builtin-fast-export.c: turn error into warning Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-30 9:08 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
t/t9301-fast-export.sh | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index b860626..763dde5 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -262,4 +262,21 @@ test_expect_success 'cope with tagger-less tags' '
'
+test_expect_success 'set-up a few more tags for tag export tests' '
+
+ git checkout -f master &&
+ HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` &&
+ git tag tree_tag -m "tagging a tree" $HEAD_TREE &&
+ git tag -a tree_tag-obj -m "tagging a tree" $HEAD_TREE &&
+ git tag tag-obj_tag -m "tagging a tag" tree_tag-obj &&
+ git tag -a tag-obj_tag-obj -m "tagging a tag" tree_tag-obj
+
+'
+
+# NEEDSWORK: not just check return status, but validate the output
+test_expect_failure 'tree_tag' 'git fast-export tree_tag'
+test_expect_failure 'tree_tag-obj' 'git fast-export tree_tag-obj'
+test_expect_failure 'tag-obj_tag' 'git fast-export tag-obj_tag'
+test_expect_failure 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
+
test_done
--
1.6.2.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] builtin-fast-export.c: turn error into warning
2009-03-30 9:08 [PATCH 1/4] test-suite: adding a test for fast-export with tag variants Erik Faye-Lund
@ 2009-03-30 9:08 ` Erik Faye-Lund
2009-03-30 9:08 ` [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-30 9:08 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
fast-import doesn't have a syntax to support tree-objects (and some other
object-types), so fast-export shouldn't handle them. However, aborting the
operation is a bit drastic. This patch turns the error into a warning instead.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
builtin-fast-export.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 34a419c..027c4aa 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -379,8 +379,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
}
break;
default:
- die ("Unexpected object of type %s",
- typename(e->item->type));
+ warning("%s: Unexpected object of type %s, skipping.",
+ e->name,
+ typename(e->item->type));
+ continue;
}
if (commit->util)
/* more than one name for the same object */
--
1.6.2.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees
2009-03-30 9:08 ` [PATCH 2/4] builtin-fast-export.c: turn error into warning Erik Faye-Lund
@ 2009-03-30 9:08 ` Erik Faye-Lund
2009-03-30 9:08 ` [PATCH 4/4] builtin-fast-export.c: handle nested tags Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-30 9:08 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
If a tag object points to a tree (or another unhandled type), the commit-
pointer is left uninitialized and later dereferenced. This patch adds a default
case to the switch that issues a warning and skips the object.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
builtin-fast-export.c | 4 ++++
t/t9301-fast-export.sh | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 027c4aa..2070288 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -376,6 +376,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
case OBJ_BLOB:
handle_object(tag->object.sha1);
continue;
+ default:
+ warning("Tag points to object of unexpected type %s, skipping.",
+ typename(tag->object.type));
+ continue;
}
break;
default:
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index 763dde5..b587feb 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -274,8 +274,8 @@ test_expect_success 'set-up a few more tags for tag export tests' '
'
# NEEDSWORK: not just check return status, but validate the output
-test_expect_failure 'tree_tag' 'git fast-export tree_tag'
-test_expect_failure 'tree_tag-obj' 'git fast-export tree_tag-obj'
+test_expect_success 'tree_tag' 'git fast-export tree_tag'
+test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
test_expect_failure 'tag-obj_tag' 'git fast-export tag-obj_tag'
test_expect_failure 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
--
1.6.2.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] builtin-fast-export.c: handle nested tags
2009-03-30 9:08 ` [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees Erik Faye-Lund
@ 2009-03-30 9:08 ` Erik Faye-Lund
0 siblings, 0 replies; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-30 9:08 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
When tags that points to tags are passed to fast-export, an error saying
"Tag [TAGNAME] points nowhere?". This fix calls parse_object() on the object
before referencing it's tag, to ensure the tag-info is fully initialized. In
addition, it inserts a comment to point out where nested tags are handled. This
is consistent with the comment for signed tags.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
builtin-fast-export.c | 5 ++++-
t/t9301-fast-export.sh | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 2070288..b23a502 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -363,7 +363,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
break;
case OBJ_TAG:
tag = (struct tag *)e->item;
+
+ /* handle nested tags */
while (tag && tag->object.type == OBJ_TAG) {
+ parse_object(tag->object.sha1);
string_list_append(full_name, extra_refs)->util = tag;
tag = (struct tag *)tag->tagged;
}
@@ -376,7 +379,7 @@ static void get_tags_and_duplicates(struct object_array *pending,
case OBJ_BLOB:
handle_object(tag->object.sha1);
continue;
- default:
+ default: /* OBJ_TAG (nested tags) is already handled */
warning("Tag points to object of unexpected type %s, skipping.",
typename(tag->object.type));
continue;
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index b587feb..495c051 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -276,7 +276,7 @@ test_expect_success 'set-up a few more tags for tag export tests' '
# NEEDSWORK: not just check return status, but validate the output
test_expect_success 'tree_tag' 'git fast-export tree_tag'
test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
-test_expect_failure 'tag-obj_tag' 'git fast-export tag-obj_tag'
-test_expect_failure 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
+test_expect_success 'tag-obj_tag' 'git fast-export tag-obj_tag'
+test_expect_success 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
test_done
--
1.6.2.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/4] test-suite: adding a test for fast-export with tag variants
@ 2009-03-23 12:53 Erik Faye-Lund
2009-03-23 12:53 ` [PATCH 2/4] builtin-fast-export.c: turn error into warning Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-23 12:53 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
The first two new tests are crashing, so I'm adding them commented out as they
exit with unpredictable return-codes.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
t/t9301-fast-export.sh | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index 86c3760..db4b0b3 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -28,7 +28,12 @@ test_expect_success 'setup' '
git commit -m sitzt file2 &&
test_tick &&
git tag -a -m valentin muss &&
- git merge -s ours master
+ git merge -s ours master &&
+ HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` &&
+ git tag tree_tag -m "tagging a tree" $HEAD_TREE &&
+ git tag -a tree_tag-obj -m "tagging a tree" $HEAD_TREE &&
+ git tag tag-obj_tag -m "tagging a tag" tree_tag-obj &&
+ git tag -a tag-obj_tag-obj -m "tagging a tag" tree_tag-obj
'
@@ -259,4 +264,11 @@ test_expect_success 'cope with tagger-less tags' '
'
+# NEEDSWORK: not just check return status, but validate the output
+# two tests commented out due to crash and thus unreliable return code
+#test_expect_success 'tree_tag' 'git fast-export tree_tag'
+#test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
+test_expect_failure 'tag-obj_tag' 'git fast-export tag-obj_tag'
+test_expect_failure 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
+
test_done
--
1.6.2.1.225.g9a4a0.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] builtin-fast-export.c: turn error into warning
2009-03-23 12:53 [PATCH 1/4] test-suite: adding a test for fast-export with tag variants Erik Faye-Lund
@ 2009-03-23 12:53 ` Erik Faye-Lund
2009-03-23 12:53 ` [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-23 12:53 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
fast-import doesn't have a syntax to support tree-objects (and some other
object-types), so fast-export shouldn't handle them. However, aborting the
operation is a bit drastic. This patch turns the error into a warning instead.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
builtin-fast-export.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index fdf4ae9..02bad1f 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -378,8 +378,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
}
break;
default:
- die ("Unexpected object of type %s",
- typename(e->item->type));
+ warning("%s: Unexpected object of type %s, skipping.",
+ e->name,
+ typename(e->item->type));
+ continue;
}
if (commit->util)
/* more than one name for the same object */
--
1.6.2.1.225.g9a4a0.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees
2009-03-23 12:53 ` [PATCH 2/4] builtin-fast-export.c: turn error into warning Erik Faye-Lund
@ 2009-03-23 12:53 ` Erik Faye-Lund
2009-03-23 12:53 ` [PATCH 4/4] builtin-fast-export.c: handle nested tags Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-23 12:53 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
If a tag object points to a tree (or another unhandled type), the commit-
pointer is left uninitialized and later dereferenced. This patch adds a default
case to the switch that issues a warning and skips the object.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
builtin-fast-export.c | 4 ++++
t/t9301-fast-export.sh | 5 ++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 02bad1f..e716eee 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -375,6 +375,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
case OBJ_BLOB:
handle_object(tag->object.sha1);
continue;
+ default:
+ warning("Tag points to object of unexpected type %s, skipping.",
+ typename(tag->object.type));
+ continue;
}
break;
default:
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index db4b0b3..79ca832 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -265,9 +265,8 @@ test_expect_success 'cope with tagger-less tags' '
'
# NEEDSWORK: not just check return status, but validate the output
-# two tests commented out due to crash and thus unreliable return code
-#test_expect_success 'tree_tag' 'git fast-export tree_tag'
-#test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
+test_expect_success 'tree_tag' 'git fast-export tree_tag'
+test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
test_expect_failure 'tag-obj_tag' 'git fast-export tag-obj_tag'
test_expect_failure 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
--
1.6.2.1.225.g9a4a0.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] builtin-fast-export.c: handle nested tags
2009-03-23 12:53 ` [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees Erik Faye-Lund
@ 2009-03-23 12:53 ` Erik Faye-Lund
0 siblings, 0 replies; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-23 12:53 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
When tags that points to tags are passed to fast-export, an error saying
"Tag [TAGNAME] points nowhere?". This fix calls parse_object() on the object
before referencing it's tag, to ensure the tag-info is fully initialized. In
addition, it inserts a comment to point out where nested tags are handled. This
is consistent with the comment for signed tags.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
builtin-fast-export.c | 5 ++++-
t/t9301-fast-export.sh | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index e716eee..8083c5f 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -362,7 +362,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
break;
case OBJ_TAG:
tag = (struct tag *)e->item;
+
+ /* handle nested tags */
while (tag && tag->object.type == OBJ_TAG) {
+ parse_object(tag->object.sha1);
string_list_append(full_name, extra_refs)->util = tag;
tag = (struct tag *)tag->tagged;
}
@@ -375,7 +378,7 @@ static void get_tags_and_duplicates(struct object_array *pending,
case OBJ_BLOB:
handle_object(tag->object.sha1);
continue;
- default:
+ default: /* OBJ_TAG (nested tags) is already handled */
warning("Tag points to object of unexpected type %s, skipping.",
typename(tag->object.type));
continue;
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index 79ca832..7e94893 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -267,7 +267,7 @@ test_expect_success 'cope with tagger-less tags' '
# NEEDSWORK: not just check return status, but validate the output
test_expect_success 'tree_tag' 'git fast-export tree_tag'
test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
-test_expect_failure 'tag-obj_tag' 'git fast-export tag-obj_tag'
-test_expect_failure 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
+test_expect_success 'tag-obj_tag' 'git fast-export tag-obj_tag'
+test_expect_success 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
test_done
--
1.6.2.1.225.g9a4a0.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/4] test-suite: adding a test for fast-export with tag variants
@ 2009-03-22 21:50 Erik Faye-Lund
2009-03-22 21:50 ` [PATCH 2/4] builtin-fast-export.c: turn error into warning Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-22 21:50 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
t/t9302-fast-export-tags.sh | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
create mode 100644 t/t9302-fast-export-tags.sh
diff --git a/t/t9302-fast-export-tags.sh b/t/t9302-fast-export-tags.sh
new file mode 100644
index 0000000..2ecac32
--- /dev/null
+++ b/t/t9302-fast-export-tags.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 Erik Faye-Lund
+#
+
+test_description='git fast-export tag variants'
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+ touch dummy &&
+ git add dummy &&
+ git commit -m "initial commit" &&
+ HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` &&
+ git tag tree_tag -m "tagging a tree" $HEAD_TREE &&
+ git tag -a tree_tag-obj -m "tagging a tree" $HEAD_TREE &&
+ git tag tag-obj_tag -m "tagging a tag" tree_tag-obj &&
+ git tag -a tag-obj_tag-obj -m "tagging a tag" tree_tag-obj
+'
+
+test_expect_success 'tree_tag' 'git fast-export tree_tag'
+test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
+test_expect_success 'tag-obj_tag' 'git fast-export tag-obj_tag'
+test_expect_success 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
+
+test_done
--
1.6.2.1.226.gcb2dd
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] builtin-fast-export.c: turn error into warning
2009-03-22 21:50 [PATCH 1/4] test-suite: adding a test for fast-export with tag variants Erik Faye-Lund
@ 2009-03-22 21:50 ` Erik Faye-Lund
2009-03-22 21:50 ` [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-22 21:50 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
fast-import doesn't have a syntax to support tree-objects (and some other
object-types), so fast-export shouldn't handle them. However, aborting the
operation is a bit drastic. This patch turns the error into a warning instead.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
builtin-fast-export.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index fdf4ae9..02bad1f 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -378,8 +378,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
}
break;
default:
- die ("Unexpected object of type %s",
- typename(e->item->type));
+ warning("%s: Unexpected object of type %s, skipping.",
+ e->name,
+ typename(e->item->type));
+ continue;
}
if (commit->util)
/* more than one name for the same object */
--
1.6.2.1.226.gcb2dd
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees
2009-03-22 21:50 ` [PATCH 2/4] builtin-fast-export.c: turn error into warning Erik Faye-Lund
@ 2009-03-22 21:50 ` Erik Faye-Lund
2009-03-22 21:50 ` [PATCH 4/4] builtin-fast-export.c: handle nested tags Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-22 21:50 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
If a tag object points to a tree (or another unhandled type), the commit-
pointer is left uninitialized and later dereferenced. This patch adds a default
case to the switch that issues a warning and skips the object.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
builtin-fast-export.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 02bad1f..c3ce320 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -375,6 +375,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
case OBJ_BLOB:
handle_object(tag->object.sha1);
continue;
+ default: /* OBJ_TAG (nested tags) is already handled */
+ warning("Tag points to object of unexpected type %s, skipping.",
+ typename(tag->object.type));
+ continue;
}
break;
default:
--
1.6.2.1.226.gcb2dd
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] builtin-fast-export.c: handle nested tags
2009-03-22 21:50 ` [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees Erik Faye-Lund
@ 2009-03-22 21:50 ` Erik Faye-Lund
0 siblings, 0 replies; 6+ messages in thread
From: Erik Faye-Lund @ 2009-03-22 21:50 UTC (permalink / raw)
To: git; +Cc: gitster, Erik Faye-Lund
When tags that points to tags are passed to fast-export, an error saying
"Tag [TAGNAME] points nowhere?". This fix calls parse_object() on the object
before referencing it's tag, to ensure the tag-info is fully initialized. In
addition, it inserts a comment to point out where nested tags are handled. This
is consistent with the comment for signed tags.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
builtin-fast-export.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index c3ce320..8083c5f 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -362,7 +362,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
break;
case OBJ_TAG:
tag = (struct tag *)e->item;
+
+ /* handle nested tags */
while (tag && tag->object.type == OBJ_TAG) {
+ parse_object(tag->object.sha1);
string_list_append(full_name, extra_refs)->util = tag;
tag = (struct tag *)tag->tagged;
}
--
1.6.2.1.226.gcb2dd
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-03-30 9:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-30 9:08 [PATCH 1/4] test-suite: adding a test for fast-export with tag variants Erik Faye-Lund
2009-03-30 9:08 ` [PATCH 2/4] builtin-fast-export.c: turn error into warning Erik Faye-Lund
2009-03-30 9:08 ` [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees Erik Faye-Lund
2009-03-30 9:08 ` [PATCH 4/4] builtin-fast-export.c: handle nested tags Erik Faye-Lund
-- strict thread matches above, loose matches on Subject: below --
2009-03-23 12:53 [PATCH 1/4] test-suite: adding a test for fast-export with tag variants Erik Faye-Lund
2009-03-23 12:53 ` [PATCH 2/4] builtin-fast-export.c: turn error into warning Erik Faye-Lund
2009-03-23 12:53 ` [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees Erik Faye-Lund
2009-03-23 12:53 ` [PATCH 4/4] builtin-fast-export.c: handle nested tags Erik Faye-Lund
2009-03-22 21:50 [PATCH 1/4] test-suite: adding a test for fast-export with tag variants Erik Faye-Lund
2009-03-22 21:50 ` [PATCH 2/4] builtin-fast-export.c: turn error into warning Erik Faye-Lund
2009-03-22 21:50 ` [PATCH 3/4] builtin-fast-export.c: fix crash on tagged trees Erik Faye-Lund
2009-03-22 21:50 ` [PATCH 4/4] builtin-fast-export.c: handle nested tags Erik Faye-Lund
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).