DGA-MI-SSI / YaCo

YaCo is an Hex-Rays IDA plugin. When enabled, multiple users can work simultaneously on the same binary. Any modification done by any user is synchronized through git version control.
GNU General Public License v3.0
313 stars 36 forks source link

YaCo does not detect the git repo and crashes IDA if it is a git submodule #46

Closed saidelike closed 6 years ago

saidelike commented 6 years ago

One temporary workaround I've tried for dealing with #44 is to use git submodules.

Basically having one git repo which contains one folder/submodule per idb. There isn't real value in having that instead of just having a random folder containing the all the git repo (instead of submodules) but it could be just that you want your main repo with lots of stuff and a folder in that repo that contains your idb.

Anyway...

So the first thing when dealing with a git submodule is when you click "Edit > Plugin > YaCo" for the first time to create the "_local.idb" file it prompts for "Specify a remote origin" and fill it with "ssh://username@repository_path/". However if you do it for a clone of the git repo, it won't do it as it will detect successfully the git repo automatically.

Then also if you validate with a valid git repo or leave it blank, in both case it crashes IDA.

My guess is because the .git file is not a folder for a git submodule but it contains text that points to the real path for the git info, YaCo just does not support it.

gitdir: ../../../.git/path/to/git/submodule

Anyway, at the end I won't need that and will just clone several repos but thought I would mention that it crashes IDA in case someone else encounters this problem.

bamiaux commented 6 years ago

I've fixed it, it won't crash anymore on invalid git repositories and support git submodules Patch coming later

bamiaux commented 6 years ago

@saidelike This issue was closed automatically when merging the patch, but does it work for you ?