-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I just realized that getting the stats of a corresponding name is gonna be more complicated than I thought.
If I want to fetch reps by name in the database, what I'm really doing is fetching reps by file (or, by the MD5 hash of their contents) in the database.
Suppose I do a couple exercises. One is in the exercises directory called hello, and another is a file from the current directory called hello. Suppose their contents are different too. When I'm looking for stats of a file matching the name hello, I only want to see entries for one of those files. Comparing stats for files of different contents is not a useful comparison, especially if the files are wildly different.
So how to tackle this? There are some options.
Add a hash flag to only match files by their hash
Add a --file flag, which accepts a path to a file, and then queries the table by the hash of the contents of the file?
would this make the --name flag unnecessary then?
Pass a file path as an argument to the stats command, which does the same as the proposed --file flag?
consistent behavior to the sweet command, which I like
I may have to put this in it's own issue and address it later, depending on how people use the original sweet command