git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@schwinge.name>
To: u.kleine-koenig@pengutronix.de
To: u.kleine-koenig@pengutronix.de
Cc: Thomas Schwinge <thomas@schwinge.name>, git@vger.kernel.org
Subject: [PATCH] README: Sketch out what tg rename OLD NEW would do.
Date: Sun, 28 Feb 2010 14:28:38 +0100	[thread overview]
Message-ID: <1267363718-27990-1-git-send-email-thomas@schwinge.name> (raw)
In-Reply-To: <20100228101320.GA13987@pengutronix.de>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

... 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)

      reply	other threads:[~2010-02-28 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-27 22:39 [PATCH] README: Sketch out what tg rename OLD NEW would do Thomas Schwinge
2010-02-28 10:13 ` Uwe Kleine-König
2010-02-28 13:28   ` Thomas Schwinge [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=1267363718-27990-1-git-send-email-thomas@schwinge.name \
    --to=thomas@schwinge.name \
    --cc=git@vger.kernel.org \
    --cc=u.kleine-koenig@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;
as well as URLs for NNTP newsgroup(s).