Re: [TopGit TOY PATCH] tg-graft: forge tip--base--<deps...> history for a subcommand
- From
Bert Wesarg <bert.wesarg@googlemail.com>
- Date
- Aug 13, 2008, 07:10 UTC
- Message-ID
- <36ca99e90808130010w226a8947y1e1c59e5f5d57989@mail.gmail.com>
- In-Reply-To
- <1218575416-16711-1-git-send-email-trast@student.ethz.ch>
On Tue, Aug 12, 2008 at 23:10, Thomas Rast <trast@student.ethz.ch> wrote:
Show 33 quoted lines
> Adds a command 'tg graft <command>' that evaluates <command> with a > special GIT_GRAFT_FILE: the parent of each patch head is its patch > base, and the parents of the patch base are the dependencies of the > patch. > > Try, for example, 'tg graft "gitk --all"'. > > Signed-off-by: Thomas Rast <trast@student.ethz.ch> > --- > > Mainly sending this so someone can turn it into a useful feature, and > maybe build a few subcommands on top of it (that might call gitk or > 'git log --graph', for example). > > The one big issue with the resulting history is that the commit > messages at the tip aren't very interesting and may even be completely > irrelevant (for a base merge). I don't see a good solution for that. > > Makefile | 2 +- > tg-graft.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 48 insertions(+), 1 deletions(-) > create mode 100755 tg-graft.sh > > diff --git a/Makefile b/Makefile > index 6eade1e..57745c0 100644 > --- a/Makefile > +++ b/Makefile > @@ -6,7 +6,7 @@ sharedir = $(PREFIX)/share/topgit > hooksdir = $(cmddir)/hooks > > > -commands_in = tg-create.sh tg-delete.sh tg-export.sh tg-info.sh tg-patch.sh tg-summary.sh tg-update.sh > +commands_in = tg-create.sh tg-delete.sh tg-export.sh tg-info.sh tg-patch.sh tg-summary.sh tg-update.sh tg-graft.sh
Petr, maybe we should use a wildcard here, to prevent merge conflicts while adding new commands.
I will send a patch.
Show 20 quoted lines
> hooks_in = hooks/pre-commit.sh > > commands_out = $(patsubst %.sh,%,$(commands_in)) > diff --git a/tg-graft.sh b/tg-graft.sh > new file mode 100755 > index 0000000..b6d0458 > --- /dev/null > +++ b/tg-graft.sh > @@ -0,0 +1,47 @@ > +#!/bin/sh > +# TopGit - A different patch queue manager > +# (c) Petr Baudis <pasky@suse.cz> 2008 > +# GPLv2 > + > +if [ -z "$1" -o -n "$2" ]; then > + echo "Usage: tg graft <command>" >&2 > + exit 1 > +fi > + > +mkdir -p "$git_dir"/info
This shouldn't be needed, the info dir is created by git init.