Issue #8977 open

New files created in the old Mac file format do not appear in diffs (BB-10156)

Huu Da Tran
created an issue

For testing purposes, I have to add DOS, UN*X and MAC file format.

When creating the pull request, the mac format file is not displayed. There is a place holder with the filename, but the content is missing. This is a new file. I am not sure of the behavior when a file is changed.

Also, the "Side-by-side diff" button is missing.

Comments (8)

  1. Jon Mooring staff

    Hi Huu Da Tran,

    I was not able to reproduce this issue. How did you create the file? When creating a test file using the command touch test.html on OS X 10.8 and pushing it to Bitbucket, I see the following in the diff:

    Screen Shot 2014-02-18 at 1.45.12 PM.png

    The reason you don't see a side-by-side diff button is because with empty files, we do not assume that the file is a text file vs a binary file.

    Hope this clears up at least some of the confusion.

    Thanks,
    Jon

  2. Huu Da Tran reporter
    • changed status to open

    The file is not empty. When you touch a file, it is empty, thus there are no format associated with it. If you look carefully at my attached image in my bug report, you will see that there gray section "Empty file added." is not present, and it was clearly noted on the bug report text too.

    Try the following:

    cd /tmp
    touch dos.txt unix.txt mac.txt
    file dos.txt unix.txt mac.txt 
        dos.txt:  empty
        unix.txt: empty
        mac.txt:  empty
    
    vi dos.txt
        :set ff=dos
        i
        line one
        line two
        [ESC]
        :wq
    
    vi unix.txt
        :set ff=unix
        i
        line one
        line two
        [ESC]
        :wq
    
    vi mac.txt
        :set ff=mac
        i
        line one
        line two
        [ESC]
        :wq
    
    file dos.txt unix.txt mac.txt                                                  
        dos.txt:  ASCII text, with CRLF line terminators                                                                                    
        unix.txt: ASCII text                                                                                                                
        mac.txt:  ASCII text, with CR line terminators
    

    Then you can retry adding.

  3. Jon Mooring staff

    Huu Da Tran,

    Thanks for the clarification. I'm adding this to our backlog. As this only affects files written in the old Mac file format (OS 9 and earlier), it's unlikely that this bug will bubble to the top of our list in the short-term.

    Thanks,
    Jon

  4. Log in to comment