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

Dynamic host,tag columns widths in snapshots command #854

Merged
merged 3 commits into from
Mar 5, 2017
Merged

Dynamic host,tag columns widths in snapshots command #854

merged 3 commits into from
Mar 5, 2017

Conversation

middelink
Copy link
Member

Ok, this irritated me now long enough. Columns widths are now dynamic, with reasonable minimums.
Example output. Note how my FQDN hostname are way longer than 10 chars.

$ ../../../bin/restic -r rest:http://qnap.******:8000 snapshots
ID        Date                 Host                   Tags        Directory
----------------------------------------------------------------------
15ec968d  2017-03-02 01:18:03  bigbox.**.********.**  CH      ┌── /
                                                              │   /boot
                                                              │   /boot/efi
                                                              └── /home
9e860414  2017-03-02 03:49:02  rp1.**.********.**     CH      ┌── /
                                                              └── /boot
af61db20  2017-03-03 12:26:20  bigbox.**.********.**  CH      ┌── /
                                                              │   /boot
                                                              │   /boot/efi
                                                              └── /home
167a5e40  2017-03-03 21:35:04  abuseio.********.**    NL          /
bc407177  2017-03-04 00:30:22  bigbox.**.********.**  CH      ┌── /
                                                              │   /boot
                                                              │   /boot/efi
                                                              └── /home
d09476f9  2017-03-05 00:30:22  bigbox.**.********.**  CH      ┌── /
                                                              │   /boot
                                                              │   /boot/efi
                                                              └── /home

(excuse the ascii art, the program created it :P)

@codecov-io
Copy link

Codecov Report

Merging #854 into master will increase coverage by 0.36%.
The diff coverage is 17.64%.

@@            Coverage Diff             @@
##           master     #854      +/-   ##
==========================================
+ Coverage    53.2%   53.57%   +0.36%     
==========================================
  Files          91       91              
  Lines        7511     7517       +6     
==========================================
+ Hits         3996     4027      +31     
+ Misses       2918     2888      -30     
- Partials      597      602       +5
Impacted Files Coverage Δ
src/cmds/restic/cmd_snapshots.go 40.9% <17.64%> (+34.81%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbcab80...45e9f35. Read the comment docs.

@fd0
Copy link
Member

fd0 commented Mar 5, 2017

Hm, this PR contains two commits from #853, wait for that PR to be merged into master and then rebase it? Maybe git is also smart enough to recognize this, we can try...

A small thing for further commits (you don't need to rework the existing ones): May I ask you to adhere to the general style we use for commits (short subject line, no dot at the end)? It is documented here: https://github.com/restic/restic/blob/master/CONTRIBUTING.md#git-commits

@middelink
Copy link
Member Author

Ack on both your comments. I hope I remember the no-dot, they ingrain proper sentences at my work :P

@fd0
Copy link
Member

fd0 commented Mar 5, 2017

Interesting, I suppose that's a cultural thing. Are you also using git at work?

I can also add an integration test which check the end of the subject line 😛

@fd0 fd0 merged commit 45e9f35 into restic:master Mar 5, 2017
fd0 added a commit that referenced this pull request Mar 5, 2017
…d_snapshots

Dynamic host,tag columns widths in snapshots command
@fd0
Copy link
Member

fd0 commented Mar 5, 2017

Ok, it let me merge this just fine.

@middelink
Copy link
Member Author

Awesome! I shall try to not stack PRs on top of each other in the future.

@middelink middelink deleted the dynamic-host,tag-columns-in-cmd_snapshots branch March 5, 2017 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants