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

Re: Git v2.21.0-rc0 broken on *BSD, maybe others

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 12, 2019, 18:41 UTC
Message-ID
<xmqqva1odf41.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<xmqqlg2ldjg4.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
> If I find time later in the day, I may forge your sign-off and
> fabricate log messages for both patches, but unfortunately I need to
> run a long errand today during the day, so it may not happen.

Here is what I have, with forged sign-off. I am not merging them to 'next' yet, but will be pushing them on 'pu' shortly to give them better exposure.

-- >8 --
From: Duy Nguyen <pclouds@gmail.com>
Date: Tue, 12 Feb 2019 19:43:23 +0700
Subject: [PATCH] get_oid_with_context(): match prototype and implementation

The get_oid_with_context() function is declared to return an enum in cache.h, but defined to return an int in sha1-name.c. The compiler notices this on AIX and rejects the build, since d1dd94b308 (Do not print 'dangling' for cat-file in case of ambiguity - 2019-01-17) was merged.

Return the correct type from the implementation to fix this.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 sha1-name.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sha1-name.c b/sha1-name.c
index d1cc77c124..6dda2c16df 100644
--- a/sha1-name.c
+++ b/sha1-name.c
@@ -1820,9 +1820,11 @@ void maybe_die_on_misspelt_object_name(const char *name, const char *prefix)
 			       prefix, &oid, &oc);
 }
 
-int get_oid_with_context(struct repository *repo, const char *str,
-			 unsigned flags, struct object_id *oid,
-			 struct object_context *oc)
+enum get_oid_result get_oid_with_context(struct repository *repo,
+					 const char *str,
+					 unsigned flags,
+					 struct object_id *oid,
+					 struct object_context *oc)
 {
 	if (flags & GET_OID_FOLLOW_SYMLINKS && flags & GET_OID_ONLY_TO_DIE)
 		BUG("incompatible flags for get_sha1_with_context");
-- 
2.21.0-rc0-36-ge9bd4aa026
Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 20 in “[ANNOUNCE] Git v2.21.0-rc0”
  1. Junio C HamanoFeb 7, 2019
  2. Christian CouderFeb 7, 2019
  3. Johannes SchindelinFeb 7, 2019
  4. Johannes SchindelinFeb 7, 2019
  5. Junio C HamanoFeb 7, 2019
  6. Junio C HamanoFeb 7, 2019
  7. Git v2.21.0-rc0 broken on *BSD, maybe othersÆvar Arnfjörð Bjarmason, Feb 12, 2019
  8. Duy NguyenFeb 12, 2019
  9. Duy NguyenFeb 12, 2019
  10. Ævar Arnfjörð BjarmasonFeb 12, 2019
  11. Ævar Arnfjörð BjarmasonFeb 12, 2019
  12. SZEDER GáborFeb 12, 2019
  13. Johannes SchindelinFeb 13, 2019
  14. Junio C HamanoFeb 12, 2019
  15. Junio C HamanoFeb 12, 2019
  16. Junio C HamanoFeb 12, 2019
  17. Junio C HamanoFeb 12, 2019
  18. Junio C HamanoFeb 12, 2019
  19. SZEDER GáborFeb 12, 2019
  20. Ævar Arnfjörð BjarmasonFeb 12, 2019

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.