Re: [PATCH v2 07/14] apply: make parse_git_header public

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

 



Hi Thomas,

On Fri, 5 Jul 2019, Thomas Gummerer wrote:

> Make parse_git_header a "public" function in apply.h, so we can re-use
> it in range-diff in a subsequent commit.

This function probably wants a different name when it becomes public, as
it was relatively obvious inside `apply.c` that it was talking about a Git
_diff_ header. Maybe `parse_git_diff_header()`?

> @@ -127,6 +161,20 @@ int init_apply_state(struct apply_state *state,
>  void clear_apply_state(struct apply_state *state);
>  int check_apply_state(struct apply_state *state, int force_apply);
>
> +/*
> + * Parse a get header, starting at line.  Fills the relevant metadata

s/get/git/

Ciao,
Dscho

> + * information in 'struct patch'.
> + *
> + * Returns -1 on failure, the length of the parsed header otherwise.
> + */
> +int parse_git_header(struct strbuf *root,
> +		     int *linenr,
> +		     int p_value,
> +		     const char *line,
> +		     int len,
> +		     unsigned int size,
> +		     struct patch *patch);
> +
>  /*
>   * Some aspects of the apply behavior are controlled by the following
>   * bits in the "options" parameter passed to apply_all_patches().
> --
> 2.22.0.510.g264f2c817a
>
>




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

  Powered by Linux