ULL-ESIT-GRADOII-TFG / ghedsh

:octocat: A command line program following the philosophy of GitHub Education
http://ull-esit-gradoii-tfg.github.io/ghedsh/
GNU Lesser General Public License v3.0
0 stars 1 forks source link

git clone #37

Open crguezl opened 6 years ago

crguezl commented 6 years ago

Cuando el repo existe clone da un error:

crguezl> ULL-ESIT-PL-1718>  clone infix-to-egg-alu0100966589
fatal: destination path 'infix-to-egg-alu0100966589' already exists and is not an empty directory.
Cloned into /Users/casiano/local/src/githubclassroom/clementeTFG/carlos-armas-tfg/ghedsh

Sería mejor conducta para el profesor que cuando el repo existe el clone haga un git pull --all y actualice los repos existentes

ahcarlos commented 6 years ago

Se ha modificado la conducta. Actualizada la versión a 2.1.0

crguezl commented 6 years ago

👏 👍 🎆 ¡Great!

crguezl commented 6 years ago

Estando en este directorio:

[/tmp/ejemplo]$ ls -la
total 0
drwxr-xr-x  10 casiano  wheel  320 31 may 08:37 .
drwxrwxrwt  13 root     wheel  416 31 may 19:29 ..
drwxr-xr-x   3 casiano  wheel   96 31 may 08:37 egg-4-alu0100792218
drwxr-xr-x   3 casiano  wheel   96 31 may 08:37 egg-4-alu0100812534
drwxr-xr-x   3 casiano  wheel   96 31 may 08:37 egg-4-alu0100909678
drwxr-xr-x  14 casiano  wheel  448 31 may 08:37 egg-4-alu0100945850
drwxr-xr-x  14 casiano  wheel  448 31 may 08:37 egg-4-alu0100966589
drwxr-xr-x  14 casiano  wheel  448 31 may 08:37 egg-4-alu0100969535
drwxr-xr-x  17 casiano  wheel  544 31 may 08:37 egg-4-alu0100970876
drwxr-xr-x  17 casiano  wheel  544 31 may 08:37 egg-4-alu0100973914

Al hacer un clone obtenemos este warning:

crguezl> ULL-ESIT-PL-1718> repos /egg-4/
Fetching ULL-ESIT-PL-1718 repositories (     ●) ... done!
egg-4-alu0100969535
egg-4-alu0100973914
egg-4-angeligareta
egg-4-alu0100812534
egg-4-alu0100909678
egg-4-alu0100792218
egg-4-alu0100945850
egg-4-AlberTJ97
egg-4-alu0100970876
egg-4-alu0100966589
egg-4-AlejandroLF

crguezl> ULL-ESIT-PL-1718> clone /egg-4/
undefined method `empty?' for Dir:Class

Cloned into /private/tmp/ejemplo
crguezl commented 6 years ago

El error no se produce si el directorio inicialmente está vacío

ahcarlos commented 6 years ago

Me podría indicar la versión de Ruby que tiene instalada ?

crguezl commented 6 years ago
[/tmp/ejemplo]$ ruby --version
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
ahcarlos commented 6 years ago

Tiene toda la pinta de ser por la versión, ya que el método Dir.empty? se introdujo en la 2.4.0 según he leído aquí y en el ChangeLog Si le parece puedo utilizar otro método equivalente o avisar en la gema que se requiere una versión como mínimo 2.4.0

crguezl commented 6 years ago

OK. 2.4 está bien

ahcarlos commented 6 years ago

Funciona correctamente una vez actualizado Ruby?

crguezl commented 6 years ago

Con

$ ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin17]

no sale.

Sin embargo salen algunos warnings:

crguezl> ULL-ESIT-PL-1718> clone /egg-3/
egg-3-alu0100812534
Fetching origin
Already up to date.

egg-3-angeligareta
Fetching origin
Already up to date.

egg-3-alu0100973914
Fetching origin
Already up to date.

egg-3-alu0100966589
Fetching origin
Already up to date.

egg-3-alu0100970876
Fetching origin
Your configuration specifies to merge with the ref 'refs/heads/master'
from the remote, but no such ref was fetched.

egg-3-alu0100969535
Fetching origin
Already up to date.

egg-3-alu0100845808
Fetching origin
Your configuration specifies to merge with the ref 'refs/heads/master'
from the remote, but no such ref was fetched.

egg-3-alu0100945850
Fetching origin
Already up to date.

egg-3-AlberTJ97
Fetching origin
Already up to date.

egg-3-alu0100909678
Fetching origin
Your configuration specifies to merge with the ref 'refs/heads/master'
from the remote, but no such ref was fetched.

egg-3-alu0100792218
Fetching origin
Already up to date.

egg-3-AlejandroLF
Fetching origin
Already up to date.

Cloned into /private/tmp/ejemplo
ahcarlos commented 6 years ago

Vale, investigo sobre eso.