Thread (19 messages) flat view 19 messages, 4 authors, 2016-06-15
STALE3727d

Revision v1 of 5 in this series.

Revisions (5)
  1. v1 current
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v1 [diff vs current]

[PATCH 4/4] fast-export: trivial cleanup

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:57:10
Subsystem: the rest · Maintainer: Linus Torvalds

Cast the object to a commit, only to get the object back?

Signed-off-by: Felipe Contreras <redacted>
---
 builtin/fast-export.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 8091354..d24b4d9 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -550,7 +550,6 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info,
 
 static void handle_tags_and_duplicates(struct string_list *extra_refs)
 {
-	struct commit *commit;
 	int i;
 
 	for (i = extra_refs->nr - 1; i >= 0; i--) {
@@ -562,9 +561,7 @@ static void handle_tags_and_duplicates(struct string_list *extra_refs)
 			break;
 		case OBJ_COMMIT:
 			/* create refs pointing to already seen commits */
-			commit = (struct commit *)object;
-			printf("reset %s\nfrom :%d\n\n", name,
-			       get_object_mark(&commit->object));
+			printf("reset %s\nfrom :%d\n\n", name, get_object_mark(object));
 			show_progress();
 			break;
 		}
-- 
1.8.3.rc1.553.gac13664
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help