container-diff icon indicating copy to clipboard operation
container-diff copied to clipboard

Wrong diff labels output 'entries have been added to ...'

Open gabyx opened this issue 2 years ago • 1 comments

Expected behavior

Correct naming what is added where.

Actual behavior

It reports something has been added to imageA, but its the other way round. Output should be:

These entries have been added to bbbbb:latest:

The template is probably just wrong.

Information

  • container-diff version: v0.17.0 built from git bea7ad9
  • Operating system: macOS

Steps to reproduce the behavior

  1. FROM alpine:latest as A
    RUN touch A.txt
    
    
    FROM alpine:latest as B
    RUN touch B.txt
    
  2. docker build -f Dockerfile --target b -t bbbbb:latest . && \
    docker build -f Dockerfile --target b -t aaaaa:latest . 
    
  3. container-diff diff daemon://aaaaa:latest daemon://bbbbb:latest --type=file

  4. Output is misleading:

     -----File-----
    
     These entries have been added to aaaaa:latest:
     FILE          SIZE
     /B.txt        0
    
     These entries have been deleted from aaaaa:latest:
     FILE          SIZE
     /A.txt        0
    

gabyx avatar Mar 17 '22 11:03 gabyx

Seems this issue was resolved. Would you please make a new release? Thanks.

AaronLuo3296 avatar Jun 08 '22 04:06 AaronLuo3296