From: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
David Michael Barr <b@rr-dav.id.au>,
Jonathan Nieder <jrnieder@gmail.com>
Subject: [RFC 1/4] svndump: move struct definitions to .h
Date: Mon, 20 Aug 2012 23:57:54 +0200 [thread overview]
Message-ID: <1345499877-16024-2-git-send-email-florian.achleitner.2.6.31@gmail.com> (raw)
In-Reply-To: <1345499877-16024-1-git-send-email-florian.achleitner.2.6.31@gmail.com>
This is a preparation for adding branch detection code in separate
.c files.
External branch detection functions will need to use these.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
vcs-svn/svndump.c | 19 +++----------------
vcs-svn/svndump.h | 19 +++++++++++++++++++
2 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index 31d1d83..6ca94de 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -38,23 +38,10 @@
static struct line_buffer input = LINE_BUFFER_INIT;
-static struct {
- uint32_t action, srcRev, type;
- off_t prop_length, text_length;
- struct strbuf src, dst;
- uint32_t text_delta, prop_delta;
-} node_ctx;
+static struct node_ctx_t node_ctx;
+static struct rev_ctx_t rev_ctx;
+static struct dump_ctx_t dump_ctx;
-static struct {
- uint32_t revision;
- unsigned long timestamp;
- struct strbuf log, author, note;
-} rev_ctx;
-
-static struct {
- uint32_t version;
- struct strbuf uuid, url;
-} dump_ctx;
static void reset_node_ctx(char *fname)
{
diff --git a/vcs-svn/svndump.h b/vcs-svn/svndump.h
index b8eb129..d545453 100644
--- a/vcs-svn/svndump.h
+++ b/vcs-svn/svndump.h
@@ -1,5 +1,6 @@
#ifndef SVNDUMP_H_
#define SVNDUMP_H_
+#include "cache.h"
int svndump_init(const char *filename);
int svndump_init_fd(int in_fd, int back_fd);
@@ -7,4 +8,22 @@ void svndump_read(const char *url, const char *local_ref, const char *notes_ref)
void svndump_deinit(void);
void svndump_reset(void);
+struct node_ctx_t {
+ uint32_t action, srcRev, type;
+ off_t prop_length, text_length;
+ struct strbuf src, dst;
+ uint32_t text_delta, prop_delta;
+};
+
+struct rev_ctx_t {
+ uint32_t revision;
+ unsigned long timestamp;
+ struct strbuf log, author, note;
+};
+
+struct dump_ctx_t {
+ uint32_t version;
+ struct strbuf uuid, url;
+};
+
#endif
--
1.7.9.5
next prev parent reply other threads:[~2012-08-20 21:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 21:57 [RFC 0/4] GSOC: prepare svndump for branch detection Florian Achleitner
2012-08-20 21:57 ` Florian Achleitner [this message]
2012-08-20 21:57 ` [RFC 2/4] vcs-svn/svndump: restructure node_ctx, rev_ctx handling Florian Achleitner
2012-08-20 21:57 ` [RFC 3/4] vcs-svn/svndump: rewrite handle_node(), begin|end_revision() Florian Achleitner
2012-08-20 21:57 ` [RFC 4/4] vcs-svn: remove repo_tree Florian Achleitner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345499877-16024-2-git-send-email-florian.achleitner.2.6.31@gmail.com \
--to=florian.achleitner.2.6.31@gmail.com \
--cc=b@rr-dav.id.au \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).