From: jon@ringle.org
To: ptxdist@pengutronix.de
Cc: Jon Ringle <jringle@gridpoint.com>
Subject: [ptxdist] [PATCH] git: use git remote rm for backward compatibility
Date: Sat, 1 Feb 2014 11:58:27 -0500 [thread overview]
Message-ID: <1391273907-22030-1-git-send-email-jon@ringle.org> (raw)
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
next reply other threads:[~2014-02-01 16:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-01 16:58 jon [this message]
2014-02-03 8:06 ` Michael Olbrich
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=1391273907-22030-1-git-send-email-jon@ringle.org \
--to=jon@ringle.org \
--cc=jringle@gridpoint.com \
--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