-
Notifications
You must be signed in to change notification settings - Fork 688
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
Show upload progress #317
base: master
Are you sure you want to change the base?
Show upload progress #317
Conversation
Cool. Thank you for your contribution. I will review your code as soon as I have some time. |
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.
Thank you. This is a great move into the right direction. People were asking for more feedback for ages. And this approach will be useful for parsing error messages as well. Do you think you could extends your pull request to that?
And can you write a test case to proof that it's working?
print_info "Uploading ..." | ||
local BUFFERED_ITEMS="$1" | ||
print_info "Uploading $BUFFERED_ITEMS files..." | ||
REMOTE_CMD_OPTIONS="" |
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.
This would remove other options like --key
and --pubkey
as well.
UPLOADED=$(($UPLOADED+1)) | ||
echo -ne "\rProgress: $UPLOADED/$BUFFERED_ITEMS" | ||
done | ||
echo -ne " (Done)\n" |
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.
Why not just echo " (Done)"
?
print_progress() { | ||
local BUFFERED_ITEMS="$1" | ||
local UPLOADED=0 | ||
while IFS= read -r line |
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.
You just take each line as the output of a successful progress. What if there are error messages in between? For example when it can't upload one file, curl will print an error and then continue. Would that confuse your counting?
Hi @smeeckaert. Did you made any changes here? It would be so nice to have that feature! |
This would be awesome. |
it's 5 years and nothing updated. |
yes, this (and other pull requests) would be great. Is anybody still maintaining git-ftp? |
Hi,
I've came across the same issue as #167, namely sometime it looks like there is no activity when you upload a large number of files.
The progress is only shown in the non-verbose mode, in verbose
curl
does its thing as before.So I've changed the fire_upload_buffer method to display a progress, it looks like that :
I'm not a tremendous bash developer so tell me if it's interesting for you or if you see any changes to make.