Thread (20 messages) flat view 20 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH v3 16/19] check_branch_commit(): make first parameter const

From: Michael Haggerty <hidden>
Date: 2016-06-15 23:05:26
Subsystem: the rest · Maintainer: Linus Torvalds

Make it clear that this function does not overwrite its first
argument.

Signed-off-by: Michael Haggerty <redacted>
---
 builtin/branch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index b42e5b6..47e3eb9 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -160,7 +160,7 @@ static int branch_merged(int kind, const char *name,
 }
 
 static int check_branch_commit(const char *branchname, const char *refname,
-			       unsigned char *sha1, struct commit *head_rev,
+			       const unsigned char *sha1, struct commit *head_rev,
 			       int kinds, int force)
 {
 	struct commit *rev = lookup_commit_reference(sha1);
-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help