Re: [PATCH v2 6/6] vcs-svn: drop no-op reset methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 1, 2012 at 12:41 AM, David Barr <davidbarr@xxxxxxxxxx> wrote:
> Since v1.7.5~42^2~6 (vcs-svn: remove buffer_read_string)
> buffer_reset() does nothing thus fast_export_reset() also.
>
> Signed-off-by: David Barr <davidbarr@xxxxxxxxxx>
> ---
>  vcs-svn/fast_export.c |    5 -----
>  vcs-svn/fast_export.h |    1 -
>  vcs-svn/line_buffer.c |    4 ----
>  vcs-svn/line_buffer.h |    1 -
>  vcs-svn/svndump.c     |    2 --
>  5 files changed, 13 deletions(-)
>
> diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
> index 6ded98b..1f04697 100644
> --- a/vcs-svn/fast_export.c
> +++ b/vcs-svn/fast_export.c
> @@ -42,11 +42,6 @@ void fast_export_deinit(void)
>                die_errno("error closing fast-import feedback stream");
>  }
>
> -void fast_export_reset(void)
> -{
> -       buffer_reset(&report_buffer);
> -}
> -
>  void fast_export_delete(const char *path)
>  {
>        putchar('D');
> diff --git a/vcs-svn/fast_export.h b/vcs-svn/fast_export.h
> index aa629f5..8823aca 100644
> --- a/vcs-svn/fast_export.h
> +++ b/vcs-svn/fast_export.h
> @@ -6,7 +6,6 @@ struct line_buffer;
>
>  void fast_export_init(int fd);
>  void fast_export_deinit(void);
> -void fast_export_reset(void);
>
>  void fast_export_delete(const char *path);
>  void fast_export_modify(const char *path, uint32_t mode, const char *dataref);
> diff --git a/vcs-svn/line_buffer.c b/vcs-svn/line_buffer.c
> index 01fcb84..57cc1ce 100644
> --- a/vcs-svn/line_buffer.c
> +++ b/vcs-svn/line_buffer.c
> @@ -124,7 +124,3 @@ off_t buffer_skip_bytes(struct line_buffer *buf, off_t nbytes)
>        }
>        return done;
>  }
> -
> -void buffer_reset(struct line_buffer *buf)
> -{
> -}
> diff --git a/vcs-svn/line_buffer.h b/vcs-svn/line_buffer.h
> index 8901f21..ee23b4f 100644
> --- a/vcs-svn/line_buffer.h
> +++ b/vcs-svn/line_buffer.h
> @@ -14,7 +14,6 @@ struct line_buffer {
>  int buffer_init(struct line_buffer *buf, const char *filename);
>  int buffer_fdinit(struct line_buffer *buf, int fd);
>  int buffer_deinit(struct line_buffer *buf);
> -void buffer_reset(struct line_buffer *buf);
>
>  int buffer_tmpfile_init(struct line_buffer *buf);
>  FILE *buffer_tmpfile_rewind(struct line_buffer *buf);  /* prepare to write. */
> diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
> index 6d1e3cd..f1705f3 100644
> --- a/vcs-svn/svndump.c
> +++ b/vcs-svn/svndump.c
> @@ -499,8 +499,6 @@ void svndump_deinit(void)
>
>  void svndump_reset(void)
>  {
> -       fast_export_reset();
> -       buffer_reset(&input);
>        strbuf_release(&dump_ctx.uuid);
>        strbuf_release(&dump_ctx.url);
>        strbuf_release(&rev_ctx.log);
> --
> 1.7.10.2
>

It' a little embarrassing that I didn't catch this before submitting.
Please squash in this fix-up when queueing.

--
diff --git a/test-line-buffer.c b/test-line-buffer.c
index 7ec9b13..ef1d7ba 100644
--- a/test-line-buffer.c
+++ b/test-line-buffer.c
@@ -87,6 +87,5 @@ int main(int argc, char *argv[])
 		die("input error");
 	if (ferror(stdout))
 		die("output error");
-	buffer_reset(&stdin_buf);
 	return 0;
 }
diff --git a/test-svn-fe.c b/test-svn-fe.c
index 332a5f7..83633a2 100644
--- a/test-svn-fe.c
+++ b/test-svn-fe.c
@@ -31,9 +31,7 @@ static int apply_delta(int argc, char *argv[])
 		die_errno("cannot close preimage");
 	if (buffer_deinit(&delta))
 		die_errno("cannot close delta");
-	buffer_reset(&preimage);
 	strbuf_release(&preimage_view.buf);
-	buffer_reset(&delta);
 	return 0;
 }

--
David Barr
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]