FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.45k stars 640 forks source link

Error with submodules #213

Closed jhuriez closed 10 years ago

jhuriez commented 11 years ago

Hi,

I have an git repo which contains some submodules. And Ungit say me :

Whooops Something went wrong, reload the page to start over.

If i remove all submodules, it's work ...

FredrikNoren commented 11 years ago

Ungit should work with submodules, there's some quirks with them though such as #61.

If you're still having trouble with this can you paste the error output from ungit? (In 0.3.2 it will probably show you a git error in the ui)

(Sorry for a late response.)

FredrikNoren commented 11 years ago

Closing this now, please re-open if you're still getting an error

miebach commented 10 years ago

I could reproduce this behaviour with v 0.5.0:

1. Create empty repository

$ mkdir test $ cd test $ git init Initialized empty Git repository in c:/test/.git/

$ touch README $ git add . $ git commit -mInit [master (root-commit) fa3dc60] Init 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README

2. Add a submodule

(Using ungit as an example here, but any should work)

$ git submodule add https://github.com/FredrikNoren/ungit.git Cloning into 'ungit'... remote: Counting objects: 10543, done. remote: Compressing objects: 100% (6891/6891), done.

Resolving deltas: 2% (80/3555) Resolving deltas: 100% (3555/3555), done. warning: LF will be replaced by CRLF in .gitmodules. The file will have its original line endings in your working directory.

3. View it in ungit

$ ungit Ungit server already running Browse to http://localhost:7001/#/repository?path=c%3A%5CSRV%5Ctest1

Now in browser you see the following:

2 files, 2 to be commited - Toggle all - Discard all ✓ .gitmodules New i ✖ ✓ ungit New i ✖

4. Click on 'ungit' in the third line

The result is the error page: Whooops, Something went wrong, reload the page to start over.

At the same time in the ungit server console. No errors:

2013-11-07T14:05:28.164Z - info: GET /api/status?path=c%3A%5Ctest&socketId=4 2013-11-07T14:05:28.189Z - info: GET /api/diff?file=ungit&path=c%3A%5Ctest&socketId=4

FredrikNoren commented 10 years ago

@miebach Thanks for a detailed bug report! I'll look into it