Re: git ls-tree -d doesn't work if the specified path is the repository root?

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

 



 
> Is there some reason for this? This behavior seems like a bug to me:
> it means that prior to calling ls-tree I need to check if the
> referenced path happens to be the root, and if so, find some other
> means (rev-parse?) of converting it to a treehash.

Hmm, interesting.

I see these four behaviors:

[santiago@LykOS bg_daemon]$ git ls-tree -d HEAD -- src
    040000 tree 238a62ca62527423fd3190d00917ddfef0d254a3    src

[santiago@LykOS bg_daemon]$ git ls-tree -d HEAD -- src/
    040000 tree 767beaaf0927f89e630c52830b6fbac138ec039a    src/bg_daemon

[santiago@LykOS bg_daemon]$ git ls-tree -d HEAD -- .
    040000 tree 238a62ca62527423fd3190d00917ddfef0d254a3    src
    040000 tree de12675d1023b1e743f7e11c2276fc417b3650a6    tests

[santiago@LykOS bg_daemon]$ git ls-tree -d HEAD -- ./
    040000 tree 238a62ca62527423fd3190d00917ddfef0d254a3    src
    040000 tree de12675d1023b1e743f7e11c2276fc417b3650a6    tests

IMHO, I think it'd be more consistent if . returned the root treehash and ./
returned the treehash of the directories in root.

I don't personally know if there is a reason for this...

Thanks,
-Santiago.

> 
> Thanks,
> —Roy

Attachment: signature.asc
Description: PGP signature


[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