Re: Hash for a commit sourcetree beside to a commit hash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Philip,



Friday, February 3, 2023, 2:11:19 PM, you wrote:

PO> On 03/02/2023 02:21, Andry wrote:
>> Đoàn, 
>> Friday, February 3, 2023, 5:01:09 AM, you wrote:
>> ĐTCD>         git rev-list <a-commit-tish> |
>> ĐTCD>         while read commit; do
>> ĐTCD>                 if test $(git rev-parse $commit^{tree}) = $hash; then
>> ĐTCD>                         echo $commit
>> ĐTCD>                         break
>> ĐTCD>                 fi
>> ĐTCD>         done
>>
>> Nice, but I can not apply this over a git hub or a web interface without a clone.

PO> As a 'Distributed'-VCS, cloning the repository would be the de-facto
PO> normal approach, otherwise you have re-invented centralised VCS ;-)

Cloning repository is a heavy operation by downloading everything instead of search a single commit.
And searching at the remote does not make it a central.

PO> Alternatively, you could approach the server (hub/web interface)
PO> provider to see if they are willing to provide that level of search
PO> interface.

The GitHub already provides that in the search field. Just input a hash and see what happens.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux