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

Re: [PATCH] Makefile: add a knob to turn off hardlinks within same directory

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2011, 19:02 UTC
Message-ID
<7vaa969go4.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20111012083842.GA21969@elie.hsd1.il.comcast.net>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 28 quoted lines
> Typically someone using this setting would want to set
> NO_CROSS_DIRECTORY_HARDLINKS, too, but that is not enforced, so you
> can make $(bindir)/git and $(gitexecdir)/git into hardlinks to the
> same inode and still make sure your tarball avoids the btrfs limits if
> you want.
>
> Requested-by: Bastian Blank <waldi@debian.org>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> Hi,
>
> See <http://bugs.debian.org/642603> for context.  Sane?
>
>  Makefile |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9afdcf2a..ab64ff4c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -226,6 +226,10 @@ all::
>  # Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed
>  # programs as a tar, where bin/ and libexec/ might be on different file systems.
>  #
> +# Define NO_HARDLINKS if you plan to distribute the installed programs as a tar
> +# that might be extracted on a filesystem like btrfs that does not cope well
> +# with many links to one inode in one directory.
> +#

Hmm.... I would understand if the change were to eventually remove these "git-foo" anywhere from the filesystem perhaps after a large version bump in Git 2.0, but that is not what you are trying to do.

Wouldn't your use case be better served with
    $ tar zcf dist.tar.gz --hard-dereference $list_of_files_to_tar_up
instead?
Previous: Jonathan NiederNext: Jonathan Nieder
Message 2 of 3 in “Makefile: add a knob to turn off hardlinks within same directory”
  1. Makefile: add a knob to turn off hardlinks within same directoryJonathan Nieder, Oct 12, 2011
  2. Junio C HamanoOct 12, 2011
  3. Jonathan NiederOct 12, 2011

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.