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

[BUG?]: unpack-file behavior for blobs corresponding to symlinks

From
Elijah Newren <newren@gmail.com>
Date
Sep 19, 2008, 14:31 UTC
Message-ID
<51419b2c0809190731j5a77b8ccmba2feecb9c44cc1c@mail.gmail.com>
Hi,

unpack-file doesn't create symlinks as I'd expect. I'm not sure if this is a bug in unpack-file, or in my expectations.

To reproduce:

$ git init Initialized empty Git repository in /home/newren/testing/.git/ $ echo bla > bar $ ln -s bar foo $ git add bar foo $ git ls-files -s foo 120000 ba0e162e1c47469e3fe4b393a8bf8c569f302116 0 foo $ git unpack-file ba0e162e1c47469e3fe4b393a8bf8c569f302116 .merge_file_J1hTaV $ ls -l foo .merge_file_J1hTaV lrwxrwxrwx 1 enewren enewren 3 Sep 19 08:22 foo -> bar -rw------- 1 enewren enewren 3 Sep 19 08:23 .merge_file_J1hTaV $ echo $(cat .merge_file_J1hTaV) bar

Why is .merge_file_J1hTaV a regular file instead of a symlink? Is there an alternative command I can use that would create a symlink to bar given the information I have from the git ls-files command (and which also works for creating normal files and other special file types)?

Thanks, Elijah

Next: Mikael Magnusson
Message 1 of 4 in “[BUG?]: unpack-file behavior for blobs corresponding to symlinks”
  1. Elijah NewrenSep 19, 2008
  2. Mikael MagnussonSep 19, 2008
  3. Elijah NewrenSep 19, 2008
  4. Junio C HamanoSep 19, 2008

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.