Re: [STG PATCH] refresh: add a --index option which takes the contents of the index as the new commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2008-01-02 20:39:27 +0100, Peter Oberndorfer wrote:

> On Sonntag 30 Dezember 2007, Peter Oberndorfer wrote:
>
> > Do you think this would be a useful/good idea? Or do we want a
> > separate command for removing files from a patch anyway?
>
> The question is still open if this is useful for somebody else.

I think it's a useful addition. Thanks!

> diff --git a/stgit/stack.py b/stgit/stack.py
> index 4203931..7d14261 100644
> --- a/stgit/stack.py
> +++ b/stgit/stack.py
> @@ -668,6 +668,7 @@ class Series(PatchSet):
>          config.remove_section('branch.%s.stgit' % self.get_name())
>  
>      def refresh_patch(self, files = None, message = None, edit = False,
> +                      use_index = False,
>                        empty = False,
>                        show_patch = False,
>                        cache_update = True,
> @@ -717,6 +718,11 @@ class Series(PatchSet):
>          else:
>              tree_id = None
>  
> +        if use_index:
> +            tree_id = None
> +            files = None
> +            cache_update = False
> +
>          commit_id = git.commit(files = files,
>                                 message = descr, parents = [bottom],
>                                 cache_update = cache_update,

So the use_index parameter to refresh_patch is actually not necessary?
In that case I'd rather you didn't add it, since the functions in
stgit/stack.py have quite enough parameters already.

> diff --git a/t/t2700-refresh.sh b/t/t2700-refresh.sh
> index 2e7901c..9eae85d 100755
> --- a/t/t2700-refresh.sh
> +++ b/t/t2700-refresh.sh

Bonus points for adding a test case!

I still haven't rebased my patch stack since Catalin accepted most of
it just before Christmas. Once I've gotten around to that, I'll take
your patch -- hopefully by then updated to not add the exra argument
to refresh_patch(). :-)

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux