<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.

</pre>
<p><a href="https://github.com/macports/macports-base/commit/35e8fc4d39a671e89136c26237483a3b1d4a10c3">https://github.com/macports/macports-base/commit/35e8fc4d39a671e89136c26237483a3b1d4a10c3</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 35e8fc4d39a671e89136c26237483a3b1d4a10c3
</span>Author: Clemens Lang <neverpanic@gmail.com>
AuthorDate: Tue Jul 23 15:19:45 2024 +0200

<span style='display:block; white-space:pre;color:#404040;'>    snapshot: Report match in --diff if there are no changes
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    The user experience of 'sudo port snapshot --diff $id --all' just
</span><span style='display:block; white-space:pre;color:#404040;'>    printing nothing is not great. Improve this by explicitly printing
</span><span style='display:block; white-space:pre;color:#404040;'>    a success message if there are no changes.
</span>---
 src/macports1.0/snapshot.tcl | 5 +++++
 1 file changed, 5 insertions(+)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/snapshot.tcl b/src/macports1.0/snapshot.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 53ff52626..50f943522 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/snapshot.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/snapshot.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -141,6 +141,7 @@ namespace eval snapshot {
</span>                         }
                     }
                 }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>                 if {[llength $diff(removed)] > 0} {
                     append note "The following ports are in the snapshot but not installed:\n"
                     foreach removed_port [lsort -ascii -index 0 $diff(removed)] {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -169,6 +170,10 @@ namespace eval snapshot {
</span>                     }
                 }
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+                if {[llength $diff(added)] == 0 && [llength $diff(removed)] == 0 && [llength $diff(changed)] == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    append note "The current state and the specified snapshot match.\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>                 ui_msg [string trimright $note "\n"]
                 return 0
             }
</pre><pre style='margin:0'>

</pre>