Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Elijah Newren" <newren@gmail.com>
Cc: "Mikael Magnusson" <mikachu@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: [BUG?]: unpack-file behavior for blobs corresponding to symlinks
Date: Fri, 19 Sep 2008 08:50:13 -0700	[thread overview]
Message-ID: <7v4p4cuocq.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <51419b2c0809190755l2aa01558l30e07c4141f8d4e0@mail.gmail.com> (Elijah Newren's message of "Fri, 19 Sep 2008 08:55:36 -0600")

"Elijah Newren" <newren@gmail.com> writes:

> 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

      reply	other threads:[~2008-09-19 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19 14:31 [BUG?]: unpack-file behavior for blobs corresponding to symlinks Elijah Newren
2008-09-19 14:51 ` Mikael Magnusson
2008-09-19 14:55   ` Elijah Newren
2008-09-19 15:50     ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v4p4cuocq.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mikachu@gmail.com \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox