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

Re: [PATCH] Rename core.unreliableHardlinks to core.createObject

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 27, 2009, 23:48 UTC
Message-ID
<7vws95vete.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0904280031100.10279@pacific.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 12 quoted lines
> diff --git a/Makefile b/Makefile
> index 5c8e83a..9ca1826 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -172,8 +172,8 @@ all::
>  # information on a not yet closed file that lstat would return for the same
>  # file after it was closed.
>  #
> -# Define UNRELIABLE_HARDLINKS if your operating systems has problems when
> -# hardlinking a file to another name and unlinking the original file right
> +# Define OBJECT_CREATION_USES_RENAMES if your operating systems has problems
> +# when hardlinking a file to another name and unlinking the original file right

With the configuration variable for this relatively obscure feature in place, I wonder if we can simply get rid of the hardcoded compilation preference. After all, even on your eeepc, I presume that you have some filesystems in native format where you do not have the breakages, and some others mounted with unfsd breakage. When diagnosing a possible issue on somebody else's box, having to look into .git/config to see which codepath is used is bad enough, but it is even worse to have a default that can be different with compilation switch.

It would essentially boil down to this hunk; instead of introducing OBJECT_CREATION_MODE, we default to hardlinks, and let the configuration override it (and do nothing else).

Show 15 quoted lines
> diff --git a/environment.c b/environment.c
> index 10578d2..801a005 100644
> --- a/environment.c
> +++ b/environment.c
> @@ -43,10 +43,10 @@ unsigned whitespace_rule_cfg = WS_DEFAULT_RULE;
>  enum branch_track git_branch_track = BRANCH_TRACK_REMOTE;
>  enum rebase_setup_type autorebase = AUTOREBASE_NEVER;
>  enum push_default_type push_default = PUSH_DEFAULT_UNSPECIFIED;
> -#ifndef UNRELIABLE_HARDLINKS
> -#define UNRELIABLE_HARDLINKS 0
> +#ifndef OBJECT_CREATION_MODE
> +#define OBJECT_CREATION_MODE OBJECT_CREATION_USES_HARDLINKS
>  #endif
> -int unreliable_hardlinks = UNRELIABLE_HARDLINKS;
> +enum object_creation_mode object_creation_mode = OBJECT_CREATION_MODE;
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 32 of 38 in “Add an option not to use link(src, dest) && unlink(src) when that is unreliable”
  1. Add an option not to use link(src, dest) && unlink(src) when that is unreliableJohannes Schindelin, Apr 23, 2009
  2. Johannes SixtApr 23, 2009
  3. Johannes SchindelinApr 23, 2009
  4. Add an option not to use link(src, dest) && unlink(src) when that is unreliableJohannes Schindelin, Apr 25, 2009
  5. Junio C HamanoApr 25, 2009
  6. Linus TorvaldsApr 25, 2009
  7. Michael GaberApr 25, 2009
  8. Linus TorvaldsApr 25, 2009
  9. Jay SoffianApr 27, 2009
  10. Johannes SixtApr 25, 2009
  11. Junio C HamanoApr 25, 2009
  12. Johannes SchindelinApr 26, 2009
  13. Linus TorvaldsApr 25, 2009
  14. Alex RiesenApr 23, 2009
  15. Johannes SchindelinApr 23, 2009
  16. Alex RiesenApr 24, 2009
  17. Linus TorvaldsApr 25, 2009
  18. Johannes SixtApr 25, 2009
  19. Junio C HamanoApr 26, 2009
  20. Johannes SchindelinApr 26, 2009
  21. Add an option not to use link(src, dest) && unlink(src) when that is unreliableJohannes Schindelin, Apr 27, 2009
  22. Linus TorvaldsApr 27, 2009
  23. Johannes SchindelinApr 27, 2009
  24. Linus TorvaldsApr 27, 2009
  25. Junio C HamanoApr 27, 2009
  26. Linus TorvaldsApr 27, 2009
  27. Linus TorvaldsApr 27, 2009
  28. Junio C HamanoApr 27, 2009
  29. Johannes SchindelinApr 27, 2009
  30. Linus TorvaldsApr 27, 2009
  31. Rename core.unreliableHardlinks to core.createObjectJohannes Schindelin, Apr 27, 2009
  32. Junio C HamanoApr 27, 2009
  33. Johannes SchindelinApr 28, 2009
  34. Junio C HamanoApr 28, 2009
  35. Johannes SchindelinApr 28, 2009
  36. Junio C HamanoApr 28, 2009
  37. Johannes SchindelinApr 28, 2009
  38. Johannes SchindelinApr 26, 2009

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.