git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: 徐迪 <xudifsd@gmail.com>
To: Philip Oakley <philipoakley@iee.org>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Manually decoding a git object
Date: Mon, 20 Feb 2012 12:45:46 +0800	[thread overview]
Message-ID: <CAMocUqRNNXpGOJ2ZG8bWpkieKkVfoo0=Lkevjw+E3Tssw68Hwg@mail.gmail.com> (raw)
In-Reply-To: <A716A27D407F401DAAC373027D5CFF2A@PhilipOakley>

2012/2/20 Philip Oakley <philipoakley@iee.org>:
> If I have a renamed file which is a git object, such a "Git_Object", was
> 8c-something-or-other, what is the easiest way of examining / decoding /
> recreating the original file (either as its sha1, or a cat-file).
>
I don't think I fully understood what you mean, I assume you just move
an object file from $GIT_DIR/objects/ to somewhere and rename it,
let's call it "obj", so if you want to exam its content you can just
simply call "git cat-file -p obj". And you can also use "git cat-file
-t obj" to exam its object type. If it's a blob you can use "git
cat-file -p obj > original" to recreate it, else it's meaningless to
recreate it.

  reply	other threads:[~2012-02-20  4:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15 13:22 [PATCH/RFC] Document format of basic Git objects Nguyễn Thái Ngọc Duy
2012-02-15 17:31 ` Jonathan Nieder
2012-02-15 19:48 ` Junio C Hamano
2012-02-16  7:12   ` Junio C Hamano
2012-02-19  4:15 ` [PATCH/RFC v2] " Nguyễn Thái Ngọc Duy
2012-02-19  8:39   ` Junio C Hamano
2012-02-19  9:14     ` Junio C Hamano
2012-02-20 13:55     ` Nguyen Thai Ngoc Duy
2012-02-20 16:11       ` Jeff King
2012-02-19 18:07   ` Manually decoding a git object Philip Oakley
2012-02-20  4:45     ` 徐迪 [this message]
2012-02-20  8:19       ` Philip Oakley
2012-02-20  8:29     ` Thomas Rast
2012-02-20 10:19       ` Philip Oakley
2012-02-20 10:56         ` Thomas Rast
2012-02-20 11:39           ` 徐迪
2012-02-20 18:27           ` Philip Oakley

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='CAMocUqRNNXpGOJ2ZG8bWpkieKkVfoo0=Lkevjw+E3Tssw68Hwg@mail.gmail.com' \
    --to=xudifsd@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=philipoakley@iee.org \
    /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;
as well as URLs for NNTP newsgroup(s).