[PATCH] README: Sketch out what tg rename OLD NEW would do.
- From
Thomas Schwinge <thomas@schwinge.name>
- Date
- Feb 28, 2010, 13:28 UTC
- Message-ID
- <1267363718-27990-1-git-send-email-thomas@schwinge.name>
- In-Reply-To
- <20100228101320.GA13987@pengutronix.de>
... as proposed by me and acknowledged by David Bremner and Uwe Kleine-König on 2010-01-27 in #topgit (freenode).
Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
--- README | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/README b/README index 495c70b..a0c1bfa 100644 --- a/README +++ b/README @@ -486,7 +486,23 @@ tg push repository. By default the remote gets all dependencies (both tgish and non-tgish) and bases pushed to. -TODO: tg rename +tg rename +~~~~~~~~~ + There is no such command yet, but here's a receipe what ``tg rename OLD + NEW'' would do: + + - Have a clean state before beginning. + - Assert NEW doesn't already exist. + - git branch -m OLD NEW + - git update-ref refs/top-bases/NEW refs/top-bases/OLD '' + - for BRANCH in (all branches that depend on OLD, + i.e. reference OLD in .topdeps); do + git checkout BRANCH + sed -i 's%^OLD$%NEW$' .topdeps + git commit -m 'OLD -> NEW' .topdeps + done + - tg summary + - tg update as appropriate IMPLEMENTATION
-- tg: (341a371..) t/tg_rename (depends on: master)