"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Mark Jamsek <mark@jamsek.com>
Subject:
Re: couple style fixes
To:
Mikhail <mp39590@gmail.com>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 12 Feb 2023 23:49:37 +1100

Download raw body.

Thread
  • Mikhail:

    couple style fixes

    • Mark Jamsek:

      couple style fixes

On 23-02-12 02:35PM, Mikhail wrote:
> functions in initialization
> 
> 
> diff /home/misha/work/got
> commit - dc2745ec920dd9d588254dab4ecb6308622b06dc
> path + /home/misha/work/got
> blob - 463be5bf1c6d96c601149d660c3857be5d14931d
> file + lib/worktree.c

Thanks, Mikhail! This has been committed :)

> --- lib/worktree.c
> +++ lib/worktree.c
> @@ -1649,8 +1649,9 @@ get_file_status(unsigned char *status, struct stat *sb
>  	uint8_t fbuf[8192];
>  	struct got_blob_object *blob = NULL;
>  	size_t flen, blen;
> -	unsigned char staged_status = get_staged_status(ie);
> +	unsigned char staged_status;
>  
> +	staged_status = get_staged_status(ie);
>  	*status = GOT_STATUS_NO_CHANGE;
>  	memset(sb, 0, sizeof(*sb));
>  
> @@ -3329,12 +3330,13 @@ report_file_status(struct got_fileindex_entry *ie, con
>  {
>  	const struct got_error *err = NULL;
>  	unsigned char status = GOT_STATUS_NO_CHANGE;
> -	unsigned char staged_status = get_staged_status(ie);
> +	unsigned char staged_status;
>  	struct stat sb;
>  	struct got_object_id blob_id, commit_id, staged_blob_id;
>  	struct got_object_id *blob_idp = NULL, *commit_idp = NULL;
>  	struct got_object_id *staged_blob_idp = NULL;
>  
> +	staged_status = get_staged_status(ie);
>  	err = get_file_status(&status, &sb, ie, abspath, dirfd, de_name, repo);
>  	if (err)
>  		return err;
> 

-- 
Mark Jamsek <fnc.bsdbox.org|got.bsdbox.org>
GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68