Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git submodules are visible in source tree, but are not valid links #301

Open
fstachura opened this issue Jul 17, 2024 · 1 comment
Open
Labels

Comments

@fstachura
Copy link
Collaborator

fstachura commented Jul 17, 2024

Somewhat related to #206

9aea005 implemented filtering commit entries from ls-tree. It seems that this stopped working.

See freertos_kernel:
https://elixir.bootlin.com/amazon-freertos/latest/source
https://github.com/aws/amazon-freertos - it's a submodule here

Clicking on the submodule link redirects to directory that's above submodule entry.

@fstachura fstachura added the bug label Jul 17, 2024
@fstachura fstachura changed the title Submodules show up Git submodules are visible in source tree, but are not valid links Jul 17, 2024
@tleb
Copy link
Member

tleb commented Jul 17, 2024

script.sh list-blobs is not being used to list directory entries. It is script.sh get-dir. This command is not affected by 9aea005. Implementation:

elixir/script.sh

Lines 88 to 95 in 5c88c88

get_dir()
{
v=`echo $opt1 | version_rev`
git ls-tree -l "$v:`denormalize $opt2`" 2>/dev/null |
awk '{print $2" "$5" "$4" "$1}' |
grep -v ' \.' |
sort -t ' ' -k 1,1r -k 2,2
}

This is called inside Query.query():

elixir/query.py

Lines 144 to 152 in 5c88c88

elif cmd == 'dir':
# Returns the contents (trees or blobs) of the specified directory
# Example: ./query.py dir v3.1-rc10 /arch
version = args[0]
path = args[1]
entries_str = decode(self.script('get-dir', version, path))
return entries_str.split("\n")[:-1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants