"this operation is only valid for push"
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 1.7k
- Forks
- 408
- Merge medio
- 2 d 57 min
- PR fusionados (30 d)
- 7
Descripción
The sequence of calls
remote.ls_remotes(...)
remote.fetch(...)
remote.push(...)
works, while
remote.ls_remotes(...)
remote.push(...)
doesn't, producing the GIT_ERROR_NET / "this operation is only valid for push" error.
I think this is because ls_remotes() explicitly calls connect(..., GIT_DIRECTION_FETCH), and fetch() implicitly calls disconnect() (within git_remote_fetch()). If fetch() is not called between ls_remotes() and push(), git_remote_push() encounters an existing connection with FETCH direction, and returns an error (from git_smart__get_push_stream()).
This could be addressed in several ways: either by disconnecting explicitly in ls_remotes(), or maybe by changing the implementation of connect_or_reset_options() and the functions it calls to handle the case where direction is changing.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza reproduciendo las dos secuencias de llamadas con remote.ls_remotes(), remote.fetch() y remote.push(), y después inspecciona connect_or_reset_options() y la ruta de git_remote_push() descrita en el issue. Se considera terminado cuando hacer push directamente después de ls_remotes() tiene éxito sin el error GIT_ERROR_NET, con cobertura de regresión para esa secuencia.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- git, python
- Área
- backend, networking
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100