Re: [PATCH] submodule: remove a superfluous second check for the "new" variable

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

 



On Mon, Apr 17, 2017 at 12:59 AM, Sebastian Schuberth
<sschuberth@xxxxxxxxx> wrote:
> Signed-off-by: Sebastian Schuberth <sschuberth@xxxxxxxxx>
> ---
>  submodule.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/submodule.c b/submodule.c
> index c52d663..68623bd 100644
> --- a/submodule.c
> +++ b/submodule.c
> @@ -1396,8 +1396,7 @@ int submodule_move_head(const char *path,
>                         cp1.no_stdin = 1;
>                         cp1.dir = path;
>
> -                       argv_array_pushl(&cp1.args, "update-ref", "HEAD",
> -                                        new ? new : EMPTY_TREE_SHA1_HEX, NULL);
> +                       argv_array_pushl(&cp1.args, "update-ref", "HEAD", new, NULL);

EMPTY_TREE_SHA1_HEX != NULL?

Can you clarify the intent in the commit message?

Thanks,
Stefan



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