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

Re: [PATCH 02/13] Enable builds for z/OS.

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 14, 2023, 00:48 UTC
Message-ID
<xmqqcywd2m9i.fsf@gitster.g>
In-Reply-To
<098b9ca8ece4fdce45a9b48e576b474ed81dced1.1699871056.git.gitgitgadget@gmail.com>
"Haritha D via GitGitGadget" <gitgitgadget@gmail.com> writes:
> Subject: Re: [PATCH 02/13] Enable builds for z/OS.

Documentation/CodingGuidelines and Documentation/SubmittingPatches would help here, I think.

>  # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.
>  #
> +# Define SHELL_PATH_FOR_SCRIPTS to a POSIX shell if your /bin/sh is broken.

The reason to exist for the _FOR_SCRIPTS variants is not justified anywhere in the proposed log message.

The former should be sufficient, and our policy is to let the builder specify exactly what binaries the build products depend on, (instead of random $PATH interfere with the choice by using "#!/bin/env tool" that also has to assume that everybody's "env" is installed in "/bin").

This patch has too many #ifdefs in the primary codepaths. Your porting strategy may need to be rethought. Our usual convention is to encapsulate these platform differences as much as possible in git-compat-util.h and platform specific files in compat/ directory.

Show 17 quoted lines
> diff --git a/builtin/hash-object.c b/builtin/hash-object.c
> index 5ffec99dcea..b33b32ff977 100644
> --- a/builtin/hash-object.c
> +++ b/builtin/hash-object.c
> @@ -57,11 +57,39 @@ static void hash_fd(int fd, const char *type, const char *path, unsigned flags,
>  	maybe_flush_or_die(stdout, "hash to stdout");
>  }
>  
> +#ifdef __MVS__
> +#  if (__CHARSET_LIB == 1)
> +#  include <stdio.h>
> +#  include <stdlib.h>
> +
> +   int setbinaryfd(int fd)
> +   {
> +     attrib_t attr;
> +     int rc;

Ahh, OK, I saw [03/13] first and was utterly confused by this thing. Do not send in such a mess that introduces broken code in an early step that you need to later say "oops that one was broken and I need to fix it up with this patch". "rebase -i" is your friend to clean up your mess into a logical progression to help readers better understand what you wrote.

I'll stop here.
Previous: Junio C HamanoNext: Haritha D via GitGitGadget
Message 11 of 21 in “Enabling z/OS workflow for git”
  1. 00/13 Enabling z/OS workflow for gitHaritha via GitGitGadget, Nov 13, 2023
  2. 01/13 Enabling z/OS workflow for gitHaritha D via GitGitGadget, Nov 13, 2023
  3. 03/13 spaces and errors fix Handled git pipeline errorsHaritha D via GitGitGadget, Nov 13, 2023
  4. Junio C HamanoNov 14, 2023
  5. 04/13 fixes for build errors Handled git pipeline errorseHaritha D via GitGitGadget, Nov 13, 2023
  6. 05/13 fixes for build errorsHaritha D via GitGitGadget, Nov 13, 2023
  7. 06/13 spaces and errors fix Handled git pipeline errorsHaritha D via GitGitGadget, Nov 13, 2023
  8. 02/13 Enable builds for z/OS.Haritha D via GitGitGadget, Nov 13, 2023
  9. brian m. carlsonNov 13, 2023
  10. Junio C HamanoNov 14, 2023
  11. Junio C HamanoNov 14, 2023
  12. 07/13 spaces and errors fix Handled git pipeline errorsHaritha D via GitGitGadget, Nov 13, 2023
  13. 08/13 platform_name fix Handled git pipeline errorsHaritha D via GitGitGadget, Nov 13, 2023
  14. 09/13 strncpy fix Handled git pipeline errorsHaritha D via GitGitGadget, Nov 13, 2023
  15. 10/13 strncpy fix Handled git pipeline errorsHaritha D via GitGitGadget, Nov 13, 2023
  16. 11/13 strncpy fix Handled git pipeline errorsHaritha D via GitGitGadget, Nov 13, 2023
  17. 12/13 Handled git pipeline errors - Memory leakHaritha D via GitGitGadget, Nov 13, 2023
  18. 13/13 Handled git pipeline errors - z/OS enableHaritha D via GitGitGadget, Nov 13, 2023
  19. This PR enables a successful git build on z/OS.Haritha via GitGitGadget, Dec 4, 2023
  20. Eric SunshineDec 4, 2023
  21. René ScharfeDec 5, 2023

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.