Thread (16 messages) flat view 16 messages, 3 authors, 2016-06-15

Re: [PATCH v2 2/3] git-submodule: New subcommand 'summary' (2) - hard work

From: Ping Yin <hidden>
Date: 2016-06-15 22:44:21

On Sat, Mar 8, 2008 at 12:59 AM, Jakub Narebski [off-list ref] wrote:
"Ping Yin" [off-list ref] writes:

 > On Sat, Mar 1, 2008 at 3:29 PM, Junio C Hamano [off-list ref] wrote:
 >> Ping Yin [off-list ref] writes:
 >>
 >>> +             test -z "$check_src" ||
 >>> +             GIT_DIR="$name/.git" git-rev-parse --verify $sha1_src^0 >/dev/null 2>&1 ||
 >>> +             unfound_src=t
 >>
 >>  You do not want to do ^0; you will not be bind a non-commit in gitlink
 >>  entry anyway.
 >>
 > Actually, I need ^0. "git-rev-parse --verify sha1" will always
 > succeed if sha1 is an valid name with lenght 40 even if the sha1
 > doesn't belong to the repository.
 >
 > But what I want to verify is that the sha1 is not just valid/unique
 > but also belongs to the submodule repository.

 Don't you want "git cat-file -e <sha1>" then, unless you are checking
 more than one sha1?
Hmm, yeah, the command you give has the same effect with
   "git-rev-parse --verify sha1^0"
 --
 Jakub Narebski
 Poland
 ShadeHawk on #git


-- 
Ping Yin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help