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

[PATCH] commit: remove unused inline function single_parent()

From
René Scharfe <l.s.r@web.de>
Date
Aug 19, 2017, 08:12 UTC
Message-ID
<0993ee6c-712b-505e-9cfc-364d7ab71261@web.de>

53b2c823f6 (revision walker: mini clean-up) added the function in 2007, but it was never used, so we should be able to get rid of it now.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 commit.h | 5 -----
 1 file changed, 5 deletions(-)
diff --git a/commit.h b/commit.h
index 6d857f06c1..1283d2a51f 100644
--- a/commit.h
+++ b/commit.h
@@ -313,11 +313,6 @@ extern int interactive_add(int argc, const char **argv, const char *prefix, int
 extern int run_add_interactive(const char *revision, const char *patch_mode,
 			       const struct pathspec *pathspec);
 
-static inline int single_parent(struct commit *commit)
-{
-	return commit->parents && !commit->parents->next;
-}
-
 struct commit_list *reduce_heads(struct commit_list *heads);
 
 struct commit_extra_header {
-- 
2.14.1
Next: Junio C Hamano
Message 1 of 2 in “commit: remove unused inline function single_parent()”
  1. commit: remove unused inline function single_parent()René Scharfe, Aug 19, 2017
  2. Junio C HamanoAug 19, 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.