git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: "Yakov Lerner" <iler.ml@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: sha1 of the repo excluding history ?
Date: Thu, 12 Apr 2007 17:24:15 -0700	[thread overview]
Message-ID: <7v7ishi0k0.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <f36b08ee0704121626i6a27dcecp8b0b10e0f7db2ef7@mail.gmail.com> (Yakov Lerner's message of "Fri, 13 Apr 2007 02:26:40 +0300")

"Yakov Lerner" <iler.ml@gmail.com> writes:

>    Can I obtain from git the sha1 of the total last state of the
> repo excluding history ? This is a state that covers contents and
> names of all files and dirs, and x perm of files;
> but excludes history, timestamps, ownerhisp, and inode numbers.
>
> That would be approximately like the slow method:
>          'find | egrep -v '/\.git(/|$)' | sort | Xcpio -o | sha1sum -'
> (imagining Xcpio that does not archive any ownership, timestamps,
> and inode numbers). Can I obtain this result immediately from git ?
>
> Yakov

I think you are talking about tree object name.  git-cat-file
commit HEAD and look at "tree xxx" line.

You can use "git tar-tree $tree_object_name" to tar it up,
and "git ls-tree -r $tree_object_name" to list all the blob
object names with their perms.

      parent reply	other threads:[~2007-04-13  0:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-12 23:26 sha1 of the repo excluding history ? Yakov Lerner
2007-04-12 23:40 ` Shawn O. Pearce
2007-04-13  0:24 ` 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=7v7ishi0k0.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=iler.ml@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;
as well as URLs for NNTP newsgroup(s).