git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: "Karl Hasselström" <kha@treskal.com>
Cc: "Peter Oberndorfer" <kumbayo84@arcor.de>,
	git@vger.kernel.org, "Pavel Roskin" <proski@gnu.org>
Subject: Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Date: Thu, 24 Jan 2008 18:20:01 +0000	[thread overview]
Message-ID: <b0943d9e0801241020y3ca5e5bah973922c4fc99f733@mail.gmail.com> (raw)
In-Reply-To: <20080124180835.GA28723@diana.vm.bytemark.co.uk>

On 24/01/2008, Karl Hasselström <kha@treskal.com> wrote:
> On 2008-01-24 15:31:40 +0000, Catalin Marinas wrote:
>
> > Another thing, can the '--keep' option be added? Can it work with
> > the new structure? I use it quite often as I make some minor
> > modification and I'd like to pop patches without affecting the local
> > changes.
>
> As is, it works out of the box as long as your local changes are in
> files not touched by the command.

It used to work in this case as well :-).

> Making it work in other cases as well should be doable -- behind the
> scenes, we'd save the local changes much like a patch, and try to
> apply it at the end. (In fact, we should probably not create this
> "patch" until git-read-tree tells us it can't do its job due to local
> changes.)

My simple approach was to apply the cumulated diff of the patches to
be popped in reverse (and change the top of the stack). If there are
no conflicts, it works just fine. If it cannot do this, there might be
conflicts and I create a temporary patch manually. Merging that patch
would probably lead to conflicts needing to be solved.

For the push operation, we try the diff applying followed by a
three-way merge if the former fails. We could do something similar
with the pop operation for keeping the local changes - try the
reversed diff or create a temporary patch automatically.

But, I'd really like for this not to be enabled by default. I might
forget to refresh a patch and will go to another just to realise that
there are uncommitted changes, hence the "check_local_changes()" call
for most of the commands affecting the stack.

-- 
Catalin

      reply	other threads:[~2008-01-24 18:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16  3:19 [RFC/PATCH] Remove repo-config Dan McGee
2008-01-16  4:23 ` Junio C Hamano
2008-01-16  4:40   ` Dan McGee
2008-01-16 17:20     ` Junio C Hamano
2008-01-16 20:32       ` Junio C Hamano
2008-01-16 20:13 ` Junio C Hamano
2008-01-16 20:47 ` Peter Oberndorfer
2008-01-16 20:58   ` [STGIT PATCH] replace "git repo-config" usage by "git config" Peter Oberndorfer
2008-01-16 21:13     ` Jakub Narebski
2008-01-16 21:46       ` Peter Oberndorfer
2008-01-17 17:07       ` Catalin Marinas
2008-01-17 23:49         ` Jakub Narebski
2008-01-17  7:45     ` Karl Hasselström
2008-01-18  4:24       ` Karl Hasselström
2008-01-23 11:35         ` Catalin Marinas
2008-01-23 16:10           ` Karl Hasselström
2008-01-23 16:42             ` Catalin Marinas
2008-01-24  7:01               ` Karl Hasselström
2008-01-24 15:31                 ` Catalin Marinas
2008-01-24 18:08                   ` Karl Hasselström
2008-01-24 18:20                     ` Catalin Marinas [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=b0943d9e0801241020y3ca5e5bah973922c4fc99f733@mail.gmail.com \
    --to=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    --cc=kumbayo84@arcor.de \
    --cc=proski@gnu.org \
    /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).