forked from adamm/git-importer
		
	Compare commits
	
		
			6 Commits
		
	
	
		
			gitingore
			...
			fix_magic_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| eba3fece91 | |||
| 
						 | 
					b74f36c81e | ||
| 
						 | 
					7b9b033adc | ||
| 
						 | 
					c44cb17e5d | ||
| 
						 | 
					3384a6f2b1 | ||
| 
						 | 
					17062df04e | 
@@ -180,7 +180,7 @@ class Git:
 | 
			
		||||
    #                logging.warning(f"Error removing file {path}: {e}")
 | 
			
		||||
 | 
			
		||||
    def add(self, filename):
 | 
			
		||||
        self.git_run(["add", filename])
 | 
			
		||||
        self.git_run(["add", ":(literal)" + filename])
 | 
			
		||||
 | 
			
		||||
    def add_default_gitignore(self):
 | 
			
		||||
        if not (self.path / ".gitignore").exists():
 | 
			
		||||
@@ -241,7 +241,7 @@ class Git:
 | 
			
		||||
 | 
			
		||||
    def remove(self, file: pathlib.Path):
 | 
			
		||||
        self.git_run(
 | 
			
		||||
            ["rm", "-q", "-f", "--ignore-unmatch", file.name],
 | 
			
		||||
            ["rm", "-q", "-f", "--ignore-unmatch", ":(literal)" + file.name],
 | 
			
		||||
        )
 | 
			
		||||
        patterns = self.get_specific_lfs_gitattributes()
 | 
			
		||||
        if file.name in patterns:
 | 
			
		||||
@@ -277,7 +277,7 @@ class Git:
 | 
			
		||||
            ["remote"],
 | 
			
		||||
            stdout=subprocess.PIPE,
 | 
			
		||||
        ).stdout.decode("utf-8"):
 | 
			
		||||
            logger.warning("Not pushing to remote because no 'origin' configured")
 | 
			
		||||
            logging.warning("Not pushing to remote because no 'origin' configured")
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        cmd = ["push"]
 | 
			
		||||
 
 | 
			
		||||
@@ -86,6 +86,11 @@ class GitExporter:
 | 
			
		||||
            logging.debug(f"Committing {flat}")
 | 
			
		||||
            self.commit_flat(flat, branch_state)
 | 
			
		||||
 | 
			
		||||
        # make sure that we create devel branch
 | 
			
		||||
        if not branch_state["devel"]:
 | 
			
		||||
            logging.debug("force creating devel")
 | 
			
		||||
            self.git.set_branch_head("devel", self.git.branch_head("factory"))
 | 
			
		||||
 | 
			
		||||
        self.git.push(force=True)
 | 
			
		||||
 | 
			
		||||
    def run_gc(self):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user