From a8f6855f48fd474719e92eecc66c29a28fdc0f46 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Fri, 26 Apr 2019 16:51:57 -0700 Subject: format-patch: make --base patch-id output stable We weren't flushing the context each time we processed a hunk in the patch-id generation code in diff.c, but we were doing that when we generated "stable" patch-ids with the 'patch-id' tool. Let's port that similar logic over from patch-id.c into diff.c so we can get the same hash when we're generating patch-ids for 'format-patch --base=' types of command invocations. Cc: Xiaolong Ye Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- Documentation/git-format-patch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-format-patch.txt') diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index e8cc792e7f..1af85d404f 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -583,7 +583,7 @@ of 'base commit' in topological order before the patches can be applied. The 'base commit' is shown as "base-commit: " followed by the 40-hex of the commit object name. A 'prerequisite patch' is shown as "prerequisite-patch-id: " followed by the 40-hex 'patch id', which can -be obtained by passing the patch through the `git patch-id --unstable` +be obtained by passing the patch through the `git patch-id --stable` command. Imagine that on top of the public commit P, you applied well-known -- cgit v1.3