git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [StGit PATCH] Add a --tree flag to stg push

From
Karl Hasselström <kha@treskal.com>
Date
May 19, 2009, 07:25 UTC
Message-ID
<20090519072512.GA8451@diana.vm.bytemark.co.uk>
In-Reply-To
<20090518144754.30487.84132.stgit@krank>
On 2009-05-18 16:50:18 +0200, David Kågedal wrote:
Show 7 quoted lines
> This scratches a long-time itch for me. The typical use case is when
> you want to break up a larg patch inte smaller ones. You back out
> the orignal patch, apply a small set of changes from it and then
> push the patch back again. But then you don't want to do a merge,
> with the possibility of conflict. You simply want to restore to the
> tree that the patch had before so you can see what's left to create
> cleaned-up patches of. The command "stg push --tree" does just that.
Thanks!
There's no sign-off.
> The naming of flags and functions isn't very obvious, and
> suggestions for improvements are welcome.
--set-tree maybe?
>  t/t1207-push-tree.sh     |   64 ++++++++++++++++++++++++++++++++++++++++++++++
A test! Very good.
> +    opt('--tree', action = 'store_true',
> +        short = 'Push the patch with the original tree')

This probably deserves a long description as well. (That most existing options lack them is unfortunate---the support for long descriptions was added rather recently.)

Show 7 quoted lines
> +        if any(getattr(cd, a) != getattr(orig_cd, a) for a in
> +               ['parent', 'tree', 'author', 'message']):
> +            comm = self.__stack.repository.commit(cd)
> +            self.head = comm
> +        else:
> +            comm = None
> +            s = ' (unmodified)'
Shouldn't self.head be set in both cases?
> +# Copyright (c) 2006 David Kågedal
Been sitting on this patch long? :-)
Show 5 quoted lines
> +# don't need this repo, but better not drop it, see t1100
> +#rm -rf .git
> +
> +# Need a repo to clone
> +test_create_repo foo

Umm, your test doesn't seem to depend on using this separate repo instead of the default one.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: David KågedalNext: David Kågedal
Message 2 of 6 in “Add a --tree flag to stg push”
  1. Add a --tree flag to stg pushDavid Kågedal, May 18, 2009
  2. Karl HasselströmMay 19, 2009
  3. David KågedalMay 19, 2009
  4. Karl HasselströmMay 19, 2009
  5. Add a --set-tree flag to stg pushDavid Kågedal, May 19, 2009
  6. Karl HasselströmMay 19, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.