Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isGitRepo (0.16 sec)

  1. src/cmd/vendor/golang.org/x/mod/zip/zip.go

    		cmd.Stdout = &stdout
    		if err := cmd.Run(); err == nil {
    			fs = append(fs, dataFile{name: "LICENSE", data: stdout.Bytes()})
    		}
    	}
    
    	return fs, nil
    }
    
    // isGitRepo reports whether the given directory is a git repo.
    func isGitRepo(dir string) bool {
    	stdout := &bytes.Buffer{}
    	cmd := exec.Command("git", "rev-parse", "--git-dir")
    	cmd.Dir = dir
    	cmd.Env = append(os.Environ(), "PWD="+dir)
    	cmd.Stdout = stdout
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 12 20:38:21 UTC 2023
    - 31K bytes
    - Viewed (0)
  2. src/cmd/dist/build.go

    	// Cache version.
    	writefile(version, path, 0)
    
    	return version
    }
    
    // isGitRepo reports whether the working directory is inside a Git repository.
    func isGitRepo() bool {
    	// NB: simply checking the exit code of `git rev-parse --git-dir` would
    	// suffice here, but that requires deviating from the infrastructure
    	// provided by `run`.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
Back to top