ssc-oscar / lookup

A mirror of bitbucket.org/swcs/lookup
1 stars 4 forks source link

Knowing when File is deleted in c2f #37

Open k----n opened 3 years ago

k----n commented 3 years ago

In WoC the file is tied to a commit: echo b553e9dfc4e57a918b7d555a724f92ca6dcde618 | getValues -f c2f | grep adm_program/libs/client/jquery-file-upload/server/php/index.php

When I look at the commit (i.e. https://github.com/Admidio/admidio/commit/b553e9dfc4e57a918b7d555a724f92ca6dcde618#diff-3d36633c1d274bd14c8dcb8c8de51be31460c1e5c48a67c9262d9d5842e3b273) the file is deleted.

The only way I've figured out so far to see if the file is deleted in the commit is to clone the repo and try to checkout the file like this: git checkout b553e9dfc4e57a918b7d555a724f92ca6dcde618 -- adm_program/libs/client/jquery-file-upload/server/php/index.php If there's an error, then I know the file is deleted.

Is there a better way to do this?

k----n commented 3 years ago

I guess something with showCnt tree?

echo b553e9dfc4e57a918b7d555a724f92ca6dcde618 | showCnt commit | cut -d\; -f2 | showCnt tree

The issue I have here is I don't know how to differentiate between blob sha and tree sha to traverse all the directories.

audrism commented 3 years ago

Print the entire file system:

echo b553e9dfc4e57a918b7d555a724f92ca6dcde618 | ~/lookup/showCnt commit | cut -d\; -f2 |~/lookup/showTree.perl 3