From: Eugene Sajine <euguess@gmail.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: git@vger.kernel.org, Eugene Sajine <euguess@gmail.com>
Subject: Re: ident hash usage question
Date: Tue, 20 Oct 2009 14:59:53 -0400 [thread overview]
Message-ID: <76c5b8580910201159i75a90f28pb882e83f0c7c40ae@mail.gmail.com> (raw)
In-Reply-To: <81b0412b0910201119w7583487ag276cf964d0a85e@mail.gmail.com>
>
> Well, not exactly impossible, but you can end up with multiple paths,
> some of which may not have anything to do the original path.
>
> Just run git log --no-abbrev --raw --all and grep for the SHA-1
>
This is exactly what I was looking for! Thank you!
I understand that in some cases this can give me two paths instead of
one, but it will only demonstrate that I have absolute copy of a file
inside my repo, which is also good to diagnose (because the
probability of having two meaningful files with the same hash, but
different content is way too low).
So, this means that after few little tricks the keyword expansion
problem may be resolved by only using $Id$ keyword.
Because after having this hash one can build up all necessary info from it:
#finding blobs with SHA indicated in $Id$ keword
$ git log --no-abbrev --raw --all | grep SHA-1
# little script or regexp here (don’t have it)
$ pull out path from result
# last commit for the path with all corresponding info
$ git log -1 HEAD path
So, this seems to cover most of the needs of people who would like to
use keywords expansion, if they are not ready to forget about them…
Does it make sense?
Thanks,
Eugene
next prev parent reply other threads:[~2009-10-20 19:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 17:24 ident hash usage question Eugene Sajine
2009-10-20 18:16 ` Alex Riesen
2009-10-20 18:19 ` Alex Riesen
2009-10-20 18:59 ` Eugene Sajine [this message]
2009-10-20 19:19 ` Alex Riesen
2009-10-20 20:22 ` Johannes Sixt
2009-10-20 20:35 ` Alex Riesen
2009-10-20 20:30 ` Eugene Sajine
2009-10-20 20:43 ` Junio C Hamano
2009-10-20 22:14 ` Eugene Sajine
2009-10-20 22:30 ` Junio C Hamano
2009-10-20 23:49 ` Eugene Sajine
2009-10-21 5:35 ` Daniel Barkalow
2009-10-21 3:09 ` Nanako Shiraishi
2009-10-20 20:43 ` Alex Riesen
2009-10-20 22:19 ` Eugene Sajine
2009-10-21 6:25 ` Alex Riesen
2009-10-21 23:32 ` 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=76c5b8580910201159i75a90f28pb882e83f0c7c40ae@mail.gmail.com \
--to=euguess@gmail.com \
--cc=git@vger.kernel.org \
--cc=raa.lkml@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).