From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] git: use git remote rm for backward compatibility
Date: Mon, 3 Feb 2014 09:06:07 +0100 [thread overview]
Message-ID: <20140203080607.GD28131@pengutronix.de> (raw)
In-Reply-To: <1391273907-22030-1-git-send-email-jon@ringle.org>
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
prev parent reply other threads:[~2014-02-03 8:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-01 16:58 jon
2014-02-03 8:06 ` Michael Olbrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140203080607.GD28131@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox