From: Alex Riesen <raa.lkml@gmail.com>
To: Eugene Sajine <euguess@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: "git log -- SHA-1" - how to get/simulate this functionality?
Date: Mon, 26 Apr 2010 21:37:41 +0200 [thread overview]
Message-ID: <y2n81b0412b1004261237w1c9221dn1ac75a29f50cb74d@mail.gmail.com> (raw)
In-Reply-To: <p2v81b0412b1004261157pf26db339t7d27b1b317a99b5e@mail.gmail.com>
On Mon, Apr 26, 2010 at 20:57, Alex Riesen <raa.lkml@gmail.com> wrote:
> On Mon, Apr 26, 2010 at 20:22, Eugene Sajine <euguess@gmail.com> wrote:
>> Well thank you for that, but that gives me what i already know - the content.
>> I need to "reverse engineer" the history by having only the content
>> and its SHA-1 in order to indentify the last commitID and get all
>> relevant info (author, date etc. )
>
> Hmm. In that case, your using of git log look like a good way to get the
> information. If you wanted an output format which is better suited for
> automated parsing, you can look at "git rev-list --pretty=format:...",
> let it output only commit and tree hashes, and grep the output of
> "git ls-tree" for your hash...
Actually, "git log --no-abbrev --raw --oneline" looks very simple to parse.
By the way, you may get ambiguous results: any file any time could have
had the given hash. IOW, by looking at the whole history you may see different
files having the same hash. It does mean the same content, so maybe its
OK for your purposes.
next prev parent reply other threads:[~2010-04-26 19:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 17:54 "git log -- SHA-1" - how to get/simulate this functionality? Eugene Sajine
2010-04-26 17:56 ` Eugene Sajine
2010-04-26 18:08 ` Alex Riesen
2010-04-26 18:22 ` Eugene Sajine
2010-04-26 18:57 ` Alex Riesen
2010-04-26 19:37 ` Alex Riesen [this message]
2010-04-26 20:07 ` Eugene Sajine
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=y2n81b0412b1004261237w1c9221dn1ac75a29f50cb74d@mail.gmail.com \
--to=raa.lkml@gmail.com \
--cc=euguess@gmail.com \
--cc=git@vger.kernel.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).