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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 19, 2008, 15:50 UTC
Message-ID
<7v4p4cuocq.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<51419b2c0809190755l2aa01558l30e07c4141f8d4e0@mail.gmail.com>
"Elijah Newren" <newren@gmail.com> writes:
Show 17 quoted lines
> On Fri, Sep 19, 2008 at 8:51 AM, Mikael Magnusson <mikachu@gmail.com> wrote:
>> This is not a bug. The type of a file is in the tree, not the blob, see:
>>
>> % echo -n foo > file
>> % ln -s foo symlink
>> % git add file symlink
>> % git commit
>> Created initial commit 31ad9b0 on master: file and symlink
>>  2 files changed, 2 insertions(+), 0 deletions(-)
>>  create mode 100644 file
>>  create mode 120000 symlink
>> % git ls-tree HEAD
>> 100644 blob 19102815663d23f8b75a47e7a01965dcdc96468c    file
>> 120000 blob 19102815663d23f8b75a47e7a01965dcdc96468c    symlink
>
> Good to know.  Given the mode (100644 or 120000) and the sha1sum, is
> there a git command that will create-my-file for me,...
        git checkout -- that-path      ;# from the index
        git checkout commit that-path  ;# from the commit/tree
Previous: Elijah Newren
Message 4 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.