Re: [PATCH v3 26/44] refs.c: move copy_msg to the common code

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

 



On 10/12/2015 11:51 PM, David Turner wrote:
> Rename copy_msg to copy_reflog_msg and make it public.
> 
> Signed-off-by: David Turner <dturner@xxxxxxxxxxxxxxxx>
> ---
>  refs-be-files.c | 28 +---------------------------
>  refs.c          | 26 ++++++++++++++++++++++++++
>  refs.h          |  2 ++
>  3 files changed, 29 insertions(+), 27 deletions(-)
> 
> [...]
> diff --git a/refs.c b/refs.c
> index 2515f6e..bd8c71b 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -886,6 +886,32 @@ int for_each_remote_ref_submodule(const char *submodule, each_ref_fn fn, void *c
>  	return for_each_ref_in_submodule(submodule, "refs/remotes/", fn, cb_data);
>  }
>  
> +/*
> + * copy the reflog message msg to buf, which has been allocated sufficiently
> + * large, while cleaning up the whitespaces.  Especially, convert LF to space,
> + * because reflog file is one line per entry.
> + */

Please put the docstring by the declaration in the header file.

> [...]
> diff --git a/refs.h b/refs.h
> index 7a936e2..3da5d09 100644
> --- a/refs.h
> +++ b/refs.h
> @@ -597,6 +597,8 @@ enum ref_type {
>  
>  enum ref_type ref_type(const char *refname);
>  
> +int copy_reflog_msg(char *buf, const char *msg);
> +
>  enum expire_reflog_flags {
>  	EXPIRE_REFLOGS_DRY_RUN = 1 << 0,
>  	EXPIRE_REFLOGS_UPDATE_REF = 1 << 1,
> 

Michael

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx

--
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]