-
Notifications
You must be signed in to change notification settings - Fork 786
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
Add option to generate hashes from list of files #971
Conversation
Use --generate (-g) option to consume [files] on command line as containers of lists of files to generate hashes for
Finally figured out all the CI snags. I'm not massively familar with git - let me know if I should retry this. |
Hi @Ian-Clowes, thanks for your effort. But I have a quick question: how about bucktick "`" notation? (edit: bucktick noation is incompatible with cd 🐈/path/to/xxHash🐈
printf "README.md\nLICENSE\n" > pr-971-args
cat pr-971-args
# README.md
# LICENSE
./xxhsum `< pr-971-args`
# 9c871fd3096b631d README.md
# 4a2ace65fa00bd3e LICENSE (edit) : alternative notation ./xxhsum $(< pr-971-args) |
You mean as an alternative way of passing in multiple files from a static or dynamically generated list? I agree that makes sense where things like the shell and helpers like xargs are available, although the recipies can be a bit opaque. I added the option mainly because...
|
This new capability probably deserves to be documented. I see For more details on what the capability does and why (including the relevant comment from @t-mat), one could use the Another thing I would like to see is what the format of |
Describe the use and rationale for the --generate option in the man page
Fix two snags: - Bug / quirk of Visual Studio causes failure to process CMakeLists.txt if .gitignore contains *.txt - .vs/ folder artefacts are not to be controlled
Added some new material there |
.gitignore
Outdated
@@ -47,12 +47,14 @@ tmp* | |||
tests/*.unicode | |||
tests/unicode_test* | |||
*.txt | |||
!CMakeLists.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be a topic about improving the .gitignore
content,
but I would prefer to keep it separate from this topic (i.e. a different PR),
so that we can then focus the review on why the .gitignore
would benefit an update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall i just revert and repush - or some rebase type thing (which is where I have previously created some unlikley tangles due to my newness with using git)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory, one should go back to the commit that made the unwanted change,
and either remove it from the chain if that's all it does,
or modify it to remove the change, if it's part of a larger commit, and rebase everything on top of it.
But playing with the block chain can be complex and error prone.
So at this point, it's also somewhat simpler to just erase the unwanted changes manually and make that a new commit.
What matter is that, as a whole, this multi-commits PR doesn't modify .gitignore
(and we can have a separate PR for that).
OK, almost there! Beyond the minor change requested from this PR ( I'm wondering if this is a good name to describe this capability. So, what about |
I think man tar has...
While xargs uses:
Casting vote to rsync:
|
This reverts commit d033aef.
- Use --files-from instead of --generate for new feature - Remove the need for --quiet when generating hashes from file list
FYI ... zstd and lz4 use
|
That's a good point @gcflymoto . I guess we could have both. |
Use --generate (-g) option to consume [files] on command line as containers of lists of files to generate hashes for