mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] git: use git remote rm for backward compatibility
@ 2014-02-01 16:58 jon
  2014-02-03  8:06 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: jon @ 2014-02-01 16:58 UTC (permalink / raw)
  To: ptxdist; +Cc: Jon Ringle

From: Jon Ringle <jringle@gridpoint.com>

In scripts/lib/ptxd_make_get.sh there is a git call for:
        git --git-dir="${mirror}" remote remove origin

This fails on git 1.7.10.4:

git: fetching 'https://git.gridpoint.com/git/gpec/linux-ec1k.git into '/home/jringle/ptxdist-src/git.gridpoint.com.git.gpec.linux-ec1k.git'...
error: Unknown subcommand: remove
usage: git remote [-v | --verbose]
   or: git remote add [-t <branch>] [-m <master>] [-f] [--mirror=<fetch|push>] <name> <url>
   or: git remote rename <old> <new>
   or: git remote rm <name>
   or: git remote set-head <name> (-a | -d | <branch>)
   or: git remote [-v | --verbose] show [-n] <name>
   or: git remote prune [-n | --dry-run] <name>
   or: git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]
   or: git remote set-branches [--add] <name> <branch>...
   or: git remote set-url <name> <newurl> [<oldurl>]
   or: git remote set-url --add <name> <newurl>
   or: git remote set-url --delete <name> <url>

    -v, --verbose         be verbose; must be placed before a subcommand

fatal: remote origin already exists.

On git 1.7.10.4, the command is 'git remote rm', not 'git remote remove'

According to the git.git commit [1] that changed this,
rm is still support, just not advertised in help.

[1] http://code.google.com/p/git-core/source/detail?spec=svne17dba8fe15028425acd6a4ebebf1b8e9377d3c6&r=e17dba8fe15028425acd6a4ebebf1b8e9377d3c6

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 scripts/lib/ptxd_make_get.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh
index a33aca3..9f388dd 100644
--- a/scripts/lib/ptxd_make_get.sh
+++ b/scripts/lib/ptxd_make_get.sh
@@ -122,7 +122,7 @@ ptxd_make_get_git() {
 	if [ ! -d "${mirror}" ]; then
 		git init --bare --shared "${mirror}"
 	else
-		git --git-dir="${mirror}" remote remove origin
+		git --git-dir="${mirror}" remote rm origin
 	fi
 	# overwrite everything so the git repository is in a defined state
 	git --git-dir="${mirror}" config transfer.fsckObjects true &&
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] git: use git remote rm for backward compatibility
  2014-02-01 16:58 [ptxdist] [PATCH] git: use git remote rm for backward compatibility jon
@ 2014-02-03  8:06 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2014-02-03  8:06 UTC (permalink / raw)
  To: ptxdist

On Sat, Feb 01, 2014 at 11:58:27AM -0500, jon@ringle.org wrote:
> From: Jon Ringle <jringle@gridpoint.com>
> 
> In scripts/lib/ptxd_make_get.sh there is a git call for:
>         git --git-dir="${mirror}" remote remove origin
> 
> This fails on git 1.7.10.4:
> 
> git: fetching 'https://git.gridpoint.com/git/gpec/linux-ec1k.git into '/home/jringle/ptxdist-src/git.gridpoint.com.git.gpec.linux-ec1k.git'...
> error: Unknown subcommand: remove
> usage: git remote [-v | --verbose]
>    or: git remote add [-t <branch>] [-m <master>] [-f] [--mirror=<fetch|push>] <name> <url>
>    or: git remote rename <old> <new>
>    or: git remote rm <name>
>    or: git remote set-head <name> (-a | -d | <branch>)
>    or: git remote [-v | --verbose] show [-n] <name>
>    or: git remote prune [-n | --dry-run] <name>
>    or: git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]
>    or: git remote set-branches [--add] <name> <branch>...
>    or: git remote set-url <name> <newurl> [<oldurl>]
>    or: git remote set-url --add <name> <newurl>
>    or: git remote set-url --delete <name> <url>
> 
>     -v, --verbose         be verbose; must be placed before a subcommand
> 
> fatal: remote origin already exists.
> 
> On git 1.7.10.4, the command is 'git remote rm', not 'git remote remove'
> 
> According to the git.git commit [1] that changed this,
> rm is still support, just not advertised in help.
> 
> [1] http://code.google.com/p/git-core/source/detail?spec=svne17dba8fe15028425acd6a4ebebf1b8e9377d3c6&r=e17dba8fe15028425acd6a4ebebf1b8e9377d3c6
> 
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>

Thanks, applied.

Michael

> ---
>  scripts/lib/ptxd_make_get.sh |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh
> index a33aca3..9f388dd 100644
> --- a/scripts/lib/ptxd_make_get.sh
> +++ b/scripts/lib/ptxd_make_get.sh
> @@ -122,7 +122,7 @@ ptxd_make_get_git() {
>  	if [ ! -d "${mirror}" ]; then
>  		git init --bare --shared "${mirror}"
>  	else
> -		git --git-dir="${mirror}" remote remove origin
> +		git --git-dir="${mirror}" remote rm origin
>  	fi
>  	# overwrite everything so the git repository is in a defined state
>  	git --git-dir="${mirror}" config transfer.fsckObjects true &&
> -- 
> 1.7.10.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-03  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-01 16:58 [ptxdist] [PATCH] git: use git remote rm for backward compatibility jon
2014-02-03  8:06 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox