Allow adding new files to an empty repo (#24164)

This commit is contained in:
parent
01214c8ada
commit
e422342eeb
31 changed files with 314 additions and 138 deletions
|
@ -211,10 +211,18 @@ type RunOpts struct {
|
|||
Env []string
|
||||
Timeout time.Duration
|
||||
UseContextTimeout bool
|
||||
Dir string
|
||||
Stdout, Stderr io.Writer
|
||||
Stdin io.Reader
|
||||
PipelineFunc func(context.Context, context.CancelFunc) error
|
||||
|
||||
// Dir is the working dir for the git command, however:
|
||||
// FIXME: this could be incorrect in many cases, for example:
|
||||
// * /some/path/.git
|
||||
// * /some/path/.git/gitea-data/data/repositories/user/repo.git
|
||||
// If "user/repo.git" is invalid/broken, then running git command in it will use "/some/path/.git", and produce unexpected results
|
||||
// The correct approach is to use `--git-dir" global argument
|
||||
Dir string
|
||||
|
||||
Stdout, Stderr io.Writer
|
||||
Stdin io.Reader
|
||||
PipelineFunc func(context.Context, context.CancelFunc) error
|
||||
}
|
||||
|
||||
func commonBaseEnvs() []string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue