Sublime Forum

Can't open repo - 'doesn't look like a git repository'

#1

Unable to open a repo using Sublime Merge that was cloned from bitbucket using the repo tool from: https://storage.googleapis.com/git-repo-downloads/repo

The repo is sync’d and can interact with it using command line. There is a .git folder in the repo:
image

Sublime Merge is on latest and I am able to clone the same repo from bitbucket to another directory; just can’t open the one that is already cloned using command line.

0 Likes

#2

What error does Sublime Merge show? I tried my own git svn clone repository and it worked fine, I wonder if the sync tool you’re using is creating a not-quite-valid git repository.

0 Likes

#3

error is: ‘doesn’t look like a git repository’.
I get the same error using ‘smerge [PATH TO REPO]’
We use cygwin and it works with this repo.
One difference I can see vs the repo I can open is that this repo has ‘config’, ‘description’, ‘hooks’, ‘info’, ‘logs’, ‘objects’, and ‘refs’ encoded as binary system files whereas they are folders when cloned using sublime merge. Below is the .git folder for the same repo when cloned directly with Sublime Merge:
image

0 Likes

#4

I’m trying to reproduce this, but I can’t get repo to create "system file"s instead of symbilic links.

0 Likes

#5

I think the reason is it is saving the repo that way is that the commands are run inside cygwin on a PC. Then I am trying to run Merge natively on the PC. Would be nice to do but maybe not surprising it doesn’t work in retrospect.
Steps:

  1. Install cygwin: https://www.cygwin.com/setup-x86_64.exe
  2. Setup cygwin, from terminal:
C:\cygwin64\setup-x86_64.exe --no-desktop --no-shortcuts--no-startmenu --quiet-mode -P_autorebase,alternatives,base-cygwin,base-files,bash,binutils,bzip2,ca-certificates,coreutils,cscope,csih,curl,cygrunsrv,cygutils,cygwin,dash,dejavu-fonts,diffutils,editrights,file,findutils,gawk,getent,git,gnupg,grep,groff,gzip,hostname,idle2,info,ipc-utils,less,libargp,libattr1,libblkid1,libbz2_1,libcom_err2,libcrypt0,libcurl4,libdb5.3,libedit0,libexpat1,libffi6,libfontconfig-common,libfontconfig1,libfreetype6,libgcc1,libgdbm4,libgmp10,libgssapi_krb5_2,libiconv,libiconv2,libidn2_0,libintl8,libk5crypto3,libkrb5_3,libkrb5support0,liblzma5,libmetalink3,libmpfr4,libncursesw10,libnghttp2_14,libopenldap2_4_2,libopenssl100,libp11-kit0,libpcre1,libpipeline1,libpng16,libpopt-common,libpopt0,libpsl5,libreadline7,libsasl2_3,libsigsegv2,libsmartcols1,libsqlite3_0,libssh2_1,libssp0,libstdc++6,libtasn1_6,libunistring2,libusb0,libuuid-devel,libuuid1,libX11_6,libXau6,libxcb1,libXdmcp6,libXext6,libXft2,libXrender1,libXss1,login,man-db,mintty,ncurses,openssh,openssl,p11-kit,p11-kit-trust,perl,perl-Error,perl-TermReadKey,perl_autorebase,perl_base,publicsuffix-list-dafsa,python2,python2-test,python2-tkinter,python3,rebase,rsync,run,sed,tar,tcl,tcl-tix,tcl-tk,terminfo,tzcode,tzdata,util-linux,vim-minimal,which,xz,zlib0
  1. From cygwin command prompt, setup git:
git config --global user.name "First Last"
git config --global user.email "first.last@company.com"
git config --global core.autocrlf false
  1. Still in cygwin, create bin directory for repo tool:
mkdir ~/bin
echo 'export PATH=${HOME}/bin:${PATH}' >> ~/.bashrc
source ~/.bashrc
  1. Still in cygwin, install repo tool:
curl https://storage.googleapis.com/git-repo-downloads/repo >
~/bin/repo
chmod a+x ~/bin/repo
  1. In cywgin, download source:
mkdir ~/<WORKING_DIR>
cd ~/<WORKING_DIR>
repo init -u git@bitbucket.org:<PATH>/manifest.git
repo sync
0 Likes

#6

Looks like cygwin doesn’t actually create symlinks unless you use an environment variable.

The repository created by cygwin isn’t recognized by git for windows either, which is what merge uses for some functionality. I think this is a fundamental incompatibility between how cygwin and git for windows work, thus considering Sublime Merge uses git for windows I don’t see this ever being supported. I’d suggest either using the aforementioned environment variable or switching to git for windows.

0 Likes

#7

Fair enough. Thanks for looking at it. Sorry for not being clearer about the setup initially.

0 Likes

#8

I propably should note that I have at least one repository which is not recognized as well, by Sublime Merge. Git recongizes it well though. Can’t unfortunatelly hand it out for debugging as it contains sensitive private data.

0 Likes