From: Matt McCutchen <matt@mattmccutchen.net>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: StGIT: Trouble adding files to non-topmost patch
Date: Thu, 07 Feb 2008 23:30:24 -0500 [thread overview]
Message-ID: <1202445024.27753.54.camel@localhost> (raw)
I keep a copy of the Eclipse source code checked out from CVS, and I use
StGIT to manage both long-term and short-term local changes to the
source. (StGIT is so much nicer than shuffling patches by hand!) My
StGIT patch stack is based on an empty tree; the bottom-most patch
(named "origin") contains the original Eclipse source and the others
contain my changes. I use "cvs up" to pull updates from Eclipse's
repository, a custom script to load the updates into the git index, and
"stg refresh -p origin" to load them into the patch stack.
However, when the Eclipse developers create new files, I can't seem to
add them to "origin" this way. After my index-updating script runs,
"git status" shows that the new files have been added to the index,
but "stg refresh -p origin" doesn't change "origin" and the new files
show as untracked again. Some investigation revealed that the problem
is that, whenever StGIT pops a patch (including as part of "stg refresh
-p"), it resets the index. Here's the relevant code in git.py:
def switch(tree_id, keep = False):
"""Switch the tree to the given id
"""
if keep:
# only update the index while keeping the local changes
GRun('read-tree', tree_id).run()
This behavior doesn't affect changes and deletions since StGIT
automatically adds them back to the index, but it completely controverts
additions. Please provide a direct way to add files to non-topmost
patches.
One could argue that my setup is bad. I could work around the problem
by loading updates using a separate tree holding a clean CVS checkout,
but then it is less convenient to check out additional modules. I could
download and import the entire CVS history with git-cvsimport, but that
would take an enormous amount of time and disk space. I'm open to
practical suggestions for a better setup, but I do hope the problem with
StGIT gets fixed.
[I am off-list; please include me in replies.]
Matt
next reply other threads:[~2008-02-08 4:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 4:30 Matt McCutchen [this message]
2008-02-08 8:33 ` StGIT: Trouble adding files to non-topmost patch Karl Hasselström
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=1202445024.27753.54.camel@localhost \
--to=matt@mattmccutchen.net \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.