Re: [PATCH 5/5] Split out the actual commit creation from the option parsing etc.

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

 



Kristian Høgsberg <krh@xxxxxxxxxx> writes:

> @@ -85,40 +129,20 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
>  			parents++;
>  	}
>  
> -	/* Not having i18n.commitencoding is the same as having utf-8 */
> -	encoding_is_utf8 = is_encoding_utf8(git_commit_encoding);
> +	buffer = NULL;
> +	if (read_fd(0, &buffer, &len))
> +		die("Could not read commit message from standard input");
>  
> -	strbuf_init(&sb);
> -	strbuf_printf(&sb, "tree %s\n", sha1_to_hex(tree_sha1));
> +	commit_sha1 = create_commit(tree_sha1,
> +				    parent_sha1, parents,
> +				    xstrdup(git_author_info(1)),
> +				    xstrdup(git_committer_info(1)),
> +				    buffer, len);

Hmph, the series was so nice so far, but here we have a few new
leak, presumably so small per process invocation that we do not
care about?

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

  Powered by Linux