Re: [PATCH 7/8] Add infrastructure to write revisions in fast-export format
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 15, 2010, 19:28 UTC
- Message-ID
- <20100715192839.GD2774@burratino>
- In-Reply-To
- <1279210984-31604-8-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra wrote:
Show 6 quoted lines
> diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c > new file mode 100644 > index 0000000..7552803 > --- /dev/null > +++ b/vcs-svn/fast_export.c > @@ -0,0 +1,75 @@
[...]
Show 5 quoted lines
> +void fast_export_modify(uint32_t depth, uint32_t *path, uint32_t mode,
> + uint32_t mark)
> +{
> + /* Mode must be 100644, 100755, 120000, or 160000. */
> + printf("M %06o :%d ", mode, mark);David tweaked the API nicely upstream to enforce this constraint. So nice things will come with the next pull from him.
Show 11 quoted lines
> diff --git a/vcs-svn/fast_export.h b/vcs-svn/fast_export.h > new file mode 100644 > index 0000000..47e8f56 > --- /dev/null > +++ b/vcs-svn/fast_export.h > @@ -0,0 +1,14 @@ > +#ifndef FAST_EXPORT_H_ > +#define FAST_EXPORT_H_ > + > +#include <stdint.h> > +#include <time.h>
The usual convention within git is to rely on .c files to include git-compat-util.h (indirectly through cache.h or directly).
> +/* Memory pools for commit, dir and dirent */ > +obj_pool_gen(commit, struct repo_commit, 4096); > +obj_pool_gen(dir, struct repo_dir, 4096); > +obj_pool_gen(dirent, struct repo_dirent, 4096);
Are the semicolons necessary? (A nitpick, I know).
That said, this part is looking pretty good.