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

ipfs add option to sort Unixfs entries in a certain order #8353

Closed
3 tasks done
Artoria2e5 opened this issue Aug 18, 2021 · 1 comment
Closed
3 tasks done

ipfs add option to sort Unixfs entries in a certain order #8353

Artoria2e5 opened this issue Aug 18, 2021 · 1 comment
Labels
kind/feature A new feature

Comments

@Artoria2e5
Copy link

Checklist

  • My issue is specific & actionable.
  • I am not suggesting a protocol enhancement.
  • I have searched on the issue tracker for my issue.

Description

The XKCD archive QmdmQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm is currently quite hard to browse through as the filenames are sorted lexicographically instead of numerically. It might be a good idea to allow user some control over ipfs add to prevent this sort of thing from happening, using one of the two options:

  • A new --sort feature to define a sorting method (lexicographic, numeric, version...). This may... get out of hand (see the bunch of sorting-methods sort(1) accepts), so as an alternative:
  • A way to let ipfs add accept piped filenames similar to the Unix cpio command and use the stdin-given order. The command-line <path>... option may be useful for mockups, but command-line length limit is a very real thing when we are talking about doing --recursive on our own to maintain a sorted order.
@Artoria2e5 Artoria2e5 added the kind/feature A new feature label Aug 18, 2021
@Jorropo
Copy link
Contributor

Jorropo commented Aug 5, 2022

It's not possible, the unixfs spec (probably sadly) REQUIREs lexicographic sorting.

I already broke estuary <-> boost transfers by using (base32) numerical sorting in Linux2ipfs so this has real impacts.
(see filecoin-project/boost#673 for more details)

@Jorropo Jorropo closed this as completed Aug 5, 2022
@Jorropo Jorropo closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A new feature
Projects
None yet
Development

No branches or pull requests

2 participants