RFC: add option "--size" to ls-files to print the file size#1829
RFC: add option "--size" to ls-files to print the file size#1829larsxschneider wants to merge 2 commits intogit-lfs:masterfrom
Conversation
|
This seems fine to me. Why not make it default though? |
|
I thought about making it the default. I didn't do it because I thought maybe someone is using the current |
|
Up to you. Default would be fine with me! |
|
How about we merge this and backport to v1.5.x, but make it default in a follow-up PR for 2.x (master)? |
|
I believe we have some helpers to convert to MB/GB etc. I'm just a few
moments away from my computer, would you mind holding off until I can find
that?
…On Thu, Jan 5, 2017 at 9:27 AM risk danger olson ***@***.***> wrote:
How about we merge this and backport to v1.5.x, but make it default in a
follow-up PR for 2.x (master)?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1829 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAbDbWolV_WVJ4R34Afbxn1hLoukzvyMks5rPRn9gaJpZM4Lb2aD>
.
|
|
In the default version we wouldn't need the @ttaylorr no rush. I thought about something like that. I wonder if this makes automated parsing harder (I use the output in scripts)? Maybe an automated MB/GB conversion could be the default and with a special argument we make it always print bytes without padding? Would that be too complicated? |
|
I say we keep size in MB as default. Anything special should be handled in some kind of @ttaylorr Sure, I was hoping to get a third opinion before merging :) |
|
Here's the piece of code that I was thinking about, but I'm not sure that it's relevant to the suggestion I'm going to make. I think a good compromise on this would be making The code looks 👍, but I think adding an integration test asserting that the sizes get printed out as expected would be good before merging. |
How so? A custom arg like |
|
How so? A custom arg like `--size` seems the opposite of a general `--format` arg.
I was thinking that it'd be strange for us to implement `--porcelain` /
`--format` in some commands but not others within a given release. I figured
that `--size` would be a good short-term solution that we could release in 2.0.0
without committing to `--porcelain` and `--format` package-wide.
Though if you don't think it'd be that big of a deal to implement this one
command at a time (potentially over a few releases), then I think we should go
right for `--format`, and skip `--size` altogether :-).
|
|
Since there's not a huge need to backport to 1.5, I'd rather just display the size in MB by default, and potentially add |
|
I don't think incrementally adding `--format` support over several releases is
a bad thing.
Sounds good to me :-). I think adding a `--format` flag here would be a good
call in that case.
|
|
Superseded by #2540 |
This was useful for me to inspect the size of LFS files.
There are two somewhat controversial decisions in there and I would like to get your feedback on them: