Re: [PATCH] format-patch: clear UNINTERESTING flag before prepare_bases

2018-06-18 Thread Ye Xiaolong
Hi, Junio Could you help review this patch? Thanks, Xiaolong On 06/04, Xiaolong Ye wrote: >When users specify the commit range with 'Z..C' pattern for format-patch, all >the parents of Z (including Z) would be marked as UNINTERESTING which would >prevent revision walk in prepare_bases from

Re: format-patch: no 'prerequisite-patch-id' info when specifying commit range

2018-06-03 Thread Ye Xiaolong
On 06/04, Junio C Hamano wrote: >Ye Xiaolong writes: > >> I narrowed down the problem to revision walk, if users specify the commit >> range >> via "Z..C" pattern, the first prepare_revision_walk function called in >> cmd_format_patch would mark all pare

Re: format-patch: no 'prerequisite-patch-id' info when specifying commit range

2018-06-03 Thread Ye Xiaolong
Hi, Junio On 05/29, Eduardo Habkost wrote: >Hi, > >I'm trying to use git-format-patch --base to generate the list of >prerequisite patches for a series, but the behavior of git >doesn't seem to match the documentation: > >When using a commit count (e.g.: "-2"), git-format-patch generates the

Re: format-patch: no 'prerequisite-patch-id' info when specifying commit range

2018-05-30 Thread Ye Xiaolong
Hi, Eduardo On 05/29, Eduardo Habkost wrote: >Hi, > >I'm trying to use git-format-patch --base to generate the list of >prerequisite patches for a series, but the behavior of git >doesn't seem to match the documentation: > >When using a commit count (e.g.: "-2"), git-format-patch generates the

Re: What's cooking in git.git (Apr 2016, #08; Fri, 29)

2016-04-29 Thread Ye Xiaolong
Hi, Junio On Fri, Apr 29, 2016 at 03:04:58PM -0700, Junio C Hamano wrote: >* xy/format-patch-base (2016-04-26) 4 commits > - format-patch: introduce format.useAutoBase configuration > - format-patch: introduce --base=auto option > - format-patch: add '--base' option to record base tree info > -

Re: [PATCH v6 0/4] Add --base option to git-format-patch to record base tree info

2016-04-27 Thread Ye Xiaolong
On Tue, Apr 26, 2016 at 11:58:39AM -0700, Junio C Hamano wrote: >Stefan Beller writes: > >>> So from where are you proposing Git to grab that information if you >>> do not tell it? "If the HEAD is detached, assume that the base is >>> where it was detached from" or something?

Re: [PATCH v5 2/4] format-patch: add '--base' option to record base tree info

2016-04-23 Thread Ye Xiaolong
On Fri, Apr 22, 2016 at 02:59:42PM -0700, Junio C Hamano wrote: >Xiaolong Ye <xiaolong...@intel.com> writes: > >> +test_expect_success 'format-patch --base' ' >> +git checkout side && >> +git format-patch --stdout --base=HEAD~~~ -1 >patch &am

Re: [PATCH v5 3/4] format-patch: introduce --base=auto option

2016-04-23 Thread Ye Xiaolong
On Fri, Apr 22, 2016 at 02:54:16PM -0700, Junio C Hamano wrote: >Xiaolong Ye <xiaolong...@intel.com> writes: > >> +if (upstream) { >> +unsigned char sha1[20]; >> +if (get_sha1(upstream, sha1)) >> +

Re: [PATCH v5 2/4] format-patch: add '--base' option to record base tree info

2016-04-23 Thread Ye Xiaolong
On Fri, Apr 22, 2016 at 02:39:28PM -0700, Junio C Hamano wrote: >Xiaolong Ye <xiaolong...@intel.com> writes: > >> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh >> index eed2981..a6ce727 100755 >> --- a/t/t4014-format-patch.sh >> +++ b/t/t4014-fo

Re: [PATCH v4 2/4] format-patch: add '--base' option to record base tree info

2016-04-14 Thread Ye Xiaolong
On Tue, Apr 12, 2016 at 12:08:33PM -0700, Junio C Hamano wrote: >> +static void prepare_bases(struct base_tree_info *bases, >> + const char *base_commit, >> + struct commit **list, >> + int total) >> +{ >> +struct commit *base =

Re: [PATCH v4 4/4] format-patch: introduce format.base configuration

2016-04-13 Thread Ye Xiaolong
On Tue, Apr 12, 2016 at 12:47:23PM -0700, Junio C Hamano wrote: >Xiaolong Ye <xiaolong...@intel.com> writes: > >> +static int config_base_commit; > >This variable is used as a simple boolean whose name is overly broad >(if it were named "config_base_auto" this

Re: [PATCH v4 2/4] format-patch: add '--base' option to record base tree info

2016-04-13 Thread Ye Xiaolong
On Tue, Apr 12, 2016 at 12:08:33PM -0700, Junio C Hamano wrote: >Xiaolong Ye <xiaolong...@intel.com> writes: > >> Maintainers or third party testers may want to know the exact base tree >> the patch series applies to. Teach git format-patch a '--base' option >>

Re: [PATCH v3 2/4] format-patch: add '--base' option to record base tree info

2016-04-09 Thread Ye Xiaolong
On Thu, Mar 31, 2016 at 10:38:04AM -0700, Junio C Hamano wrote: >> diff --git a/builtin/log.c b/builtin/log.c >> index 0d738d6..03cbab0 100644 >> --- a/builtin/log.c >> +++ b/builtin/log.c >> @@ -1185,6 +1185,82 @@ static int from_callback(const struct option *opt, >> const char *arg, int unset)

Re: [PATCH] builtin/log.c: fixup format-patch --base segfault

2016-04-09 Thread Ye Xiaolong
On Sun, Apr 03, 2016 at 02:19:53AM +0100, Ramsay Jones wrote: > >Signed-off-by: Ramsay Jones >--- > >Hi Xiaolong, > >When you next re-roll your 'xy/format-patch-base' branch could you >please squash this (or something like it) into the relevant patch. >(commit

Re: [PATCH v3 3/4] format-patch: introduce --base=auto option

2016-04-05 Thread Ye Xiaolong
On Fri, Apr 01, 2016 at 09:06:20AM -0700, Junio C Hamano wrote: >Ye Xiaolong <xiaolong...@intel.com> writes: > >> On Thu, Mar 31, 2016 at 10:43:48AM -0700, Junio C Hamano wrote: >>>Xiaolong Ye <xiaolong...@intel.com> writes: >>> >>>>

Re: [PATCH v3 2/4] format-patch: add '--base' option to record base tree info

2016-04-04 Thread Ye Xiaolong
On Fri, Apr 01, 2016 at 09:00:20AM -0700, Junio C Hamano wrote: >Ye Xiaolong <xiaolong...@intel.com> writes: > >> On Thu, Mar 31, 2016 at 10:38:04AM -0700, Junio C Hamano wrote: >> >>>The contents of this look OK, but does it format correctly via >>&g

Re: [PATCH v3 3/4] format-patch: introduce --base=auto option

2016-04-01 Thread Ye Xiaolong
On Thu, Mar 31, 2016 at 10:43:48AM -0700, Junio C Hamano wrote: >Xiaolong Ye <xiaolong...@intel.com> writes: > >> Introduce --base=auto to record the base commit info automatically, the >> base_commit >> will be the merge base of tip commit of the upstream

Re: [PATCH v3 2/4] format-patch: add '--base' option to record base tree info

2016-04-01 Thread Ye Xiaolong
On Thu, Mar 31, 2016 at 10:38:04AM -0700, Junio C Hamano wrote: >Xiaolong Ye <xiaolong...@intel.com> writes: > >> Maintainers or third party testers may want to know the exact base tree >> the patch series applies to. Teach git format-patch a '--base' option to >

Re: [PATCH v2 3/4] format-patch: introduce --base=auto option

2016-03-31 Thread Ye Xiaolong
On Thu, Mar 24, 2016 at 10:01:58AM -0700, Junio C Hamano wrote: >Ye Xiaolong <xiaolong...@intel.com> writes: > >> On Wed, Mar 23, 2016 at 11:25:41AM -0700, Junio C Hamano wrote: >>>I also do not see the point of showing "parent id" which as far as I >>&

Re: [PATCH v2 3/4] format-patch: introduce --base=auto option

2016-03-23 Thread Ye Xiaolong
On Wed, Mar 23, 2016 at 11:25:41AM -0700, Junio C Hamano wrote: >Xiaolong Ye <xiaolong...@intel.com> writes: > >> + >> +diff_setup(); >> +DIFF_OPT_SET(, RECURSIVE); >> +diff_setup_done(); > >It is annoying that you moved "d

Re: [PATCH v2 2/4] format-patch: add '--base' option to record base tree info

2016-03-23 Thread Ye Xiaolong
On Wed, Mar 23, 2016 at 11:08:20AM -0700, Junio C Hamano wrote: >Xiaolong Ye <xiaolong...@intel.com> writes: > >Reviewing the patch out of order, caller first and then callee. > >> +static void print_bases(struct base_tree_info *bases) >> +{ >> +int i; >&