Re: [RFC/PATCH] reset --hard: make use of the pretty machinery

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

 



Thomas Gummerer <t.gummerer@xxxxxxxxx> writes:

> In addition to the easier to follow code, this makes the output more
> consistent with other commands that print the title of the commit, such
> as 'git commit --oneline' or 'git checkout', which both use
> 'pp_commit_easy()' with the CMIT_FMT_ONELINE modifier.

Yes, this is absolutely the right thing to do.

> +
> +	pp_commit_easy(CMIT_FMT_ONELINE, commit, &buf);
> +	if (buf.len > 0)
> +		printf(" %s", buf.buf);
> +	putchar('\n');
> +	strbuf_release(&buf);
>  }
>  
>  static void update_index_from_diff(struct diff_queue_struct *q,

Thanks, will queue.



[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