# Strange line ending issue

1 messages from 2012-10-31 to 2012-10-31. Participants: Jie Zhang.
Thread: https://gitlist.dev/t/31990

## Jie Zhang, 2012-10-31 16:37

Subject: Strange line ending issue
Message-ID: <CACYR8yPuZTSWAq=xxAZE6oD==fCB6opgqeYr_VH8s3hrYgOZwQ@mail.gmail.com>
URL: https://gitlist.dev/e/CACYR8yPuZTSWAq%3DxxAZE6oD%3D%3DfCB6opgqeYr_VH8s3hrYgOZwQ%40mail.gmail.com

```
Hi,

I have a strange line ending issue with git. I'm not sure if it's a
bug or not. But it's really strange. Below are the steps to reproduce
what I saw:

1. $ git clone ssh://anonymous@firewall-sources.blackfin.uclinux.org:443/git/readonly-mirrors/toolchain.git

   $ cd toolchain

2. $ git status
# On branch trunk
nothing to commit, working directory clean

3. $ rm -rf libusb/msvc/libusb.dsw

4. $ git checkout libusb/msvc/libusb.dsw

5. $ git status
# On branch trunk
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#    modified:   libusb/msvc/libusb.dsw
#
no changes added to commit (use "git add" and/or "git commit -a")

6. $ git reset --hard

7. $ git status
# On branch trunk
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#    modified:   libusb/msvc/libusb.dsw
#
no changes added to commit (use "git add" and/or "git commit -a")

8. libusb.dsw is in DOS format. I changed CR-LF to CR-CR-LF in
libusb.dsw with a tool I modified from dos2unix.

9. $ git status
# On branch trunk
nothing to commit, working directory clean

I tested with git 1.7.10.4 from Debian and git 1.8.0 built by myself.
Both have same result.

Thank you.

Jie

```
