git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] fast-export: DIFF_STATUS_RENAMED instead of 'R'

From
Miguel Torroja <miguel.torroja@gmail.com>
Date
Apr 25, 2017, 00:12 UTC
Message-ID
<1493079137-1838-2-git-send-email-miguel.torroja@gmail.com>
In-Reply-To
<1493079137-1838-1-git-send-email-miguel.torroja@gmail.com>

Minor change to be consistent with the rest of the fast-export code. DIFF_STATUS_RENAMED is defined as 'R'.

Signed-off-by: Miguel Torroja <miguel.torroja@gmail.com>
---
 builtin/fast-export.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index a3ab7da..4d39324 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -280,7 +280,7 @@ static int diff_type_cmp(const void *a_, const void *b_)
 	 * appear in the output before it is renamed (e.g., when a file
 	 * was copied and renamed in the same commit).
 	 */
-	return (a->status == 'R') - (b->status == 'R');
+	return (a->status == DIFF_STATUS_RENAMED) - (b->status == DIFF_STATUS_RENAMED);
 }
 
 static void print_path_1(const char *path)
-- 
2.1.4
Previous: Miguel TorrojaNext: Jeff King
Message 2 of 9 in “fast-export: deletion action first”
  1. 1/2 fast-export: deletion action firstMiguel Torroja, Apr 25, 2017
  2. 2/2 fast-export: DIFF_STATUS_RENAMED instead of 'R'Miguel Torroja, Apr 25, 2017
  3. Jeff KingApr 25, 2017
  4. Junio C HamanoApr 25, 2017
  5. Jeff KingApr 25, 2017
  6. Junio C HamanoApr 25, 2017
  7. Jeff KingApr 25, 2017
  8. fast-export: deletion action firstMiguel Torroja, May 4, 2017
  9. miguel torrojaMay 4, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.