git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@gmail.com>
To: Peter Osterlund <petero2@telia.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] stgit: Handle 'A' flag for new files
Date: Thu, 28 Jul 2005 13:20:32 +0100	[thread overview]
Message-ID: <tnxwtnbunov.fsf@arm.com> (raw)
In-Reply-To: <m3d5p3kuv1.fsf@telia.com> (Peter Osterlund's message of "28 Jul 2005 13:55:46 +0200")

Peter Osterlund <petero2@telia.com> wrote:
> Patches that add new files don't work correctly if git reports them
> with the 'A' flag. StGIT claims there are unresolved conflicts. This
> patch fixes it.

Thanks. Applied (together with the one below).

diff --git a/stgit/git.py b/stgit/git.py
--- a/stgit/git.py
+++ b/stgit/git.py
@@ -292,7 +292,7 @@ def commit(message, files = [], parents
         rm_files=[]
         m_files=[]
         for f in cache_files:
-            if f[0] == 'N':
+            if f[0] in ['N', 'A']:
                 add_files.append(f[1])
             elif f[0] == 'D':
                 rm_files.append(f[1])
@@ -437,7 +437,8 @@ def checkout(files = [], force = False):
 def switch(tree_id):
     """Switch the tree to the given id
     """
-    to_delete = filter(lambda x: x[0] == 'N', __tree_status(tree_id = tree_id))+    to_delete = filter(lambda x: x[0] in ['N', 'A'],
+                       __tree_status(tree_id = tree_id))

     if __run('git-read-tree -m', [tree_id]) != 0:
         raise GitException, 'Failed git-read-tree -m %s' % tree_id

-- 
Catalin

      reply	other threads:[~2005-07-28 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-28 11:55 [PATCH] stgit: Handle 'A' flag for new files Peter Osterlund
2005-07-28 12: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=tnxwtnbunov.fsf@arm.com \
    --to=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=petero2@telia.com \
    /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).