threads / discuss / 31990

Strange line ending issue

Subject: Strange line ending issue

## tl;dr

One message between Oct 31, 2012 and Oct 31, 2012.

replies: 0people: 1as markdown or json

Jie Zhang· Oct 31, 2012, 16:37 UTC · lore
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

← back to recent threads