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

2018-06-04 Thread Xiaolong Ye
the list of prerequisite patch ids. Clear UNINTERESTING flag with clear_object_flags solves this issue. Reported-by: Eduardo Habkost Signed-off-by: Xiaolong Ye --- builtin/log.c | 1 + t/t4014-format-patch.sh | 6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH v6 4/4] format-patch: introduce format.useAutoBase configuration

2016-04-26 Thread Xiaolong Ye
to command line option. Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/config.txt | 5 + builtin/log.c| 17 +++-- t/t4014-format-patch.sh | 19 +++ 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/Documentation/config

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

2016-04-26 Thread Xiaolong Ye
; Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/git-format-patch.txt | 6 ++ builtin/log.c | 30 ++--- t/t4014-format-patch.sh| 39 ++ 3 files changed, 72 insertions(+), 3 deleti

[PATCH v6 1/4] patch-ids: make commit_patch_id() a public helper function

2016-04-26 Thread Xiaolong Ye
Make commit_patch_id() available to other builtins. Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- patch-ids.c | 2 +- patch-ids.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/patch-ids.c b/patch-ids.c index b7b3e5a..a4d0016 100644 --- a/patch-ids.c +++ b

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

2016-04-26 Thread Xiaolong Ye
of the first message the command outputs (either the first patch, or the cover letter), like this: base-commit: P prerequisite-patch-id: X prerequisite-patch-id: Y prerequisite-patch-id: Z Helped-by: Junio C Hamano <gits...@pobox.com> Helped-by: Wu Fengguang <fengguang...@intel.com> S

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

2016-04-26 Thread Xiaolong Ye
Thanks for Junio's reviews and suggestions. This version contains the following changes since v5: - Fix a decl-after-statement in patch 3/4. - Improve testcases to cover more scenarios and make them more portable and readable. Thanks, Xiaolong Xiaolong Ye (4): patch-ids: make

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

2016-04-21 Thread Xiaolong Ye
; Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/git-format-patch.txt | 6 ++ builtin/log.c | 27 --- t/t4014-format-patch.sh| 15 +++ 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a

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

2016-04-21 Thread Xiaolong Ye
of the first message the command outputs (either the first patch, or the cover letter), like this: base-commit: P prerequisite-patch-id: X prerequisite-patch-id: Y prerequisite-patch-id: Z Helped-by: Junio C Hamano <gits...@pobox.com> Helped-by: Wu Fengguang <fengguang...@intel.com> S

[PATCH v5 4/4] format-patch: introduce format.useAutoBase configuration

2016-04-21 Thread Xiaolong Ye
to command line option. Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/config.txt | 5 + builtin/log.c| 17 +++-- t/t4014-format-patch.sh | 18 ++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/Documentation/config

[PATCH v5 1/4] patch-ids: make commit_patch_id() a public helper function

2016-04-21 Thread Xiaolong Ye
Make commit_patch_id() available to other builtins. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- patch-ids.c | 2 +- patch-ids.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/patch-ids.c b/patch-ids.c i

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

2016-04-21 Thread Xiaolong Ye
pair-wise computation to get the merge base for the validation of base commit. - Extract "auto handling thing" from prepare_bases and put it into get_base_commit. - Use format.useAutoBase boolean variable for the auto configuration in format section. Thanks, Xiaolong. Xiao

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

2016-04-10 Thread Xiaolong Ye
passed to command line option. Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/git-format-patch.txt | 4 builtin/log.c | 21 ++--- t/t4014-format-patch.sh| 19 +++ 3 files changed, 37 insertions(+), 7 del

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

2016-04-10 Thread Xiaolong Ye
; Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/git-format-patch.txt | 4 builtin/log.c | 32 t/t4014-format-patch.sh| 14 ++ 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a

[PATCH v4 1/4] patch-ids: make commit_patch_id() a public helper function

2016-04-10 Thread Xiaolong Ye
Make commit_patch_id() available to other builtins. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- patch-ids.c | 2 +- patch-ids.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/patch-ids.c b/patch-ids.c i

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

2016-04-10 Thread Xiaolong Ye
at the end of _first_ message as below: base-commit: P prerequisite-patch-id: X prerequisite-patch-id: Y prerequisite-patch-id: Z Helped-by: Junio C Hamano <gits...@pobox.com> Helped-by: Wu Fengguang <fengguang...@intel.com> Signed-off-by: Xia

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

2016-04-10 Thread Xiaolong Ye
for the --base option and format.base configuration. - Fix a segfault error due to bases structure hasn't been initialized when --base option is not set, Thanks for Ramsay's report. Xiaolong Ye (4): patch-ids: make commit_patch_id() a public helper function format-patch: add '--base

[PATCH v3 1/4] patch-ids: make commit_patch_id() a public helper function

2016-03-30 Thread Xiaolong Ye
Make commit_patch_id() available to other builtins. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- patch-ids.c | 2 +- patch-ids.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/patch-ids.c b/patch-ids.c i

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

2016-03-30 Thread Xiaolong Ye
passed to command line option. Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/git-format-patch.txt | 2 ++ builtin/log.c | 21 ++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Documentation/git-format-patch.

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

2016-03-30 Thread Xiaolong Ye
; Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/git-format-patch.txt | 4 builtin/log.c | 31 +++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/Documentation/git-format-patch.txt b/Documentation/gi

[PATCH v3 0/4] Add an option to git-format-patch to record base tree info

2016-03-30 Thread Xiaolong Ye
stream, we just error out and suggest to use set-upstream-to to track a remote branch as upstream. v1 can be found here: http://article.gmane.org/gmane.comp.version-control.git/286873 v2 can be found here: http://article.gmane.org/gmane.comp.version-control.git/289603 Xiaolong Ye (4): patch

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

2016-03-30 Thread Xiaolong Ye
). Helped-by: Junio C Hamano <gits...@pobox.com> Helped-by: Wu Fengguang <fengguang...@intel.com> Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/git-format-patch.txt | 25 +++ builtin/log.c | 89 ++ 2

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

2016-03-23 Thread Xiaolong Ye
). Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/git-format-patch.txt | 15 ++ builtin/log.c | 98 ++ 2 files changed, 113 insertions(+) diff --git a/Documentation/git-format-patch.txt b/Documentation/git-

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

2016-03-23 Thread Xiaolong Ye
Introduce --base=auto to record the base commit info automatically, the base_commit will be the tip commit of the upstream branch. If upstream branch cannot be determined, it will just record the parent's commit id and patch id. Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- b

[PATCH v2 1/4] patch-ids: make commit_patch_id() a public helper function

2016-03-23 Thread Xiaolong Ye
Make commit_patch_id() available to other builtins. Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- patch-ids.c | 2 +- patch-ids.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/patch-ids.c b/patch-ids.c index b7b3e5a..a4d0016 100644 --- a/patch-ids.c +++ b

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

2016-03-23 Thread Xiaolong Ye
passed to command line option. Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- Documentation/git-format-patch.txt | 5 + builtin/log.c | 21 ++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Documentation/git-format-patch.

[PATCH v2 0/4] Add an option to git-format-patch to record base tree info

2016-03-23 Thread Xiaolong Ye
parent-commit: ab5d01a29eb7380ceab070f0807c2939849c44bc parent-patch-id: caf2dae24db5b4c49a6c4134dd6d9908e898424b Thanks for fengguang and junio's suggestions and prototype of implementation. Thanks, Xiaolong. Xiaolong Ye (4): patch-ids: make commit_patch_id() a public helper function format-patch: add '--base' opt

[RFC/PATCH 1/1] format-patch: add an option to record base tree info

2016-02-21 Thread Xiaolong Ye
It would be helpful for maintainers or reviewers to know the base tree info of the patches created by git format-patch. Teach git format-patch a --base-tree-info option to record these info. Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- builtin/log.c | 18 ++

[RFC/PATCH 0/1] Add an option to git-format-patch to record base tree info

2016-02-21 Thread Xiaolong Ye
th cover letter you could see the commit id at the bottom of the message. 2) without cover letter Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- builtin/log.c | 17 + diff.c| 4 diff.h| 3 ++-