Skip to content

fix(shell-sync): show both rsync & diff stats for View the changed contents#4696

Merged
AkihiroSuda merged 1 commit intolima-vm:masterfrom
unsuman:fix/show-shell-sync-0byte-newfile
Mar 12, 2026
Merged

fix(shell-sync): show both rsync & diff stats for View the changed contents#4696
AkihiroSuda merged 1 commit intolima-vm:masterfrom
unsuman:fix/show-shell-sync-0byte-newfile

Conversation

@unsuman
Copy link
Copy Markdown
Member

@unsuman unsuman commented Mar 9, 2026

Fixes #4693

Using diff -ruN fails to report newly added empty files when comparing directories. A workaround here is to show both the rsync dry-run stats and the diff output:

> View the changed contents

=== RSYNC DRY-RUN STATISTICS ===
added: 0, deleted: 0, modified: 1

Transfer starting: 10 files
>f..t.... test/new_file

sent 22 bytes  received 286 bytes  3080k bytes/sec
total size is 6191  speedup is 20.10



=== DETAILED DIFF ===

@unsuman unsuman added this to the v2.1.0 milestone Mar 9, 2026
jandubois
jandubois previously approved these changes Mar 9, 2026
Copy link
Copy Markdown
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM, but I have some nit-picking comments you might want to look at

@unsuman unsuman force-pushed the fix/show-shell-sync-0byte-newfile branch from efd8b6b to c03d4f8 Compare March 10, 2026 22:52
@unsuman unsuman requested a review from jandubois March 10, 2026 23:27
jandubois
jandubois previously approved these changes Mar 11, 2026
Copy link
Copy Markdown
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but I really only want to see "No changes", without the whole rsync dry-run and empty diff output.

I thought the command should provide feedback to the user, but I think it should still be special cased to not show

--- rsync dry-run statistics ---

No changes

--- detailed diff ---

Otherwise the PR is fine, but I would prefer this to still look a little nicer.

@unsuman
Copy link
Copy Markdown
Member Author

unsuman commented Mar 12, 2026

I think if there are no changes, it's better not show the interactive prompt at all.

@unsuman unsuman force-pushed the fix/show-shell-sync-0byte-newfile branch from c03d4f8 to 853a24c Compare March 12, 2026 06:23
@unsuman
Copy link
Copy Markdown
Member Author

unsuman commented Mar 12, 2026

Also made the headers grey
Screenshot 2026-03-12 at 12 01 57 PM

Signed-off-by: Ansuman Sahoo <anshumansahoo500@gmail.com>
@unsuman unsuman force-pushed the fix/show-shell-sync-0byte-newfile branch from 853a24c to 3674e55 Compare March 12, 2026 06:32
Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 4e54549 into lima-vm:master Mar 12, 2026
62 of 64 checks passed
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.

limactl shell --sync: "View the changed contents" does not show new files

3 participants