Changeset 1447 in tailor


Ignore:
Timestamp:
11/06/07 12:47:58 (6 years ago)
Author:
lele@…
Hash name:
20071106114758-97f81-3b66d06d8e8642a137b8bf99fd9ee2858d870e99
Message:

Tentatively fix bad value for GIT_DIR causing "fatal: Not a git repository" at bootstrap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/repository/git/__init__.py

    r1357 r1447  
    2727        Repository._load(self, project) 
    2828        self.EXECUTABLE = project.config.get(self.name, 'git-command', 'git') 
    29         self.overwrite_tags = project.config.get(self.name, 'overwrite-tags', False) 
     29        self.overwrite_tags = project.config.get(self.name, 'overwrite-tags', False) 
    3030        self.parent_repo = project.config.get(self.name, 'parent-repo') 
    3131        self.branch_point = project.config.get(self.name, 'branchpoint', 'HEAD') 
     
    4444        self.env = {} 
    4545 
     46        # XXX: this seems plain wrong to me [who does not know git at 
     47        # all!]: why storagedir gets set to repository here? and why 
     48        # the need for the GIT_DIR envvar? I fail to see when 
     49        # storagedir should be different from '.git', the default, 
     50        # given how it's being used by this class! The same with 
     51        # GIT_INDEX_FILE, that accordingly with the man page defaults 
     52        # to ".git/index" anyway... 
     53        # 
     54        self.storagedir = self.METADIR 
    4655        if self.repository: 
    47             self.storagedir = self.repository 
    48             self.env['GIT_DIR'] = self.storagedir 
     56            from os.path import join 
     57 
     58            #self.storagedir = self.repository 
     59            #self.env['GIT_DIR'] = self.storagedir 
     60            self.env['GIT_DIR'] = join(self.basedir, self.METADIR) 
    4961            self.env['GIT_INDEX_FILE'] = self.METADIR + '/index' 
    50         else: 
    51             self.storagedir = self.METADIR 
     62        #else: 
     63        #    self.storagedir = self.METADIR 
    5264 
    5365    def runCommand(self, cmd, exception=Exception, pipe=True): 
Note: See TracChangeset for help on using the changeset viewer.