On 2008-08-28 13:29:25 +0200, Marco Costalba wrote: > On Wed, Aug 27, 2008 at 10:18 PM, Jan Hudec <bulb@xxxxxx> wrote: > > > Actually, I just wrote a first simple test for it. I didn't find > > this (now the stg branch finds out properly), but I found another > > problem -- when switching from non-stgit branch to a stgit one, > > Git::init will not notice, because the path didn't change, so the > > check is not re-run. Applies to the other direction too, of > > course. > > I have never tested on repos where some branches are under stgit and > others are not. Actually I even didn't know it was possible. StGit has no per-repo data. It's all per-branch. "stg init" operates on the current branch, not the whole repo. > The command: > > isStGIT = run("stg branch", &stgCurBranch); // slow command > > is used to check if a repo is under StGit control, i.e 'stg init' > has been run in the repo working directory (it doesn't mean that > there are StGit patches applied or unapplied, could be also without > them). Hmm. For me, "stg branch" succeeds even if "stg init" has not yet been run (which is arguably as it should be, since it doesn't require that stg init has been run in the current branch). "stg series" or something is probably better for this purpose. Though if you're concerned about speed (as the comment indicates), you should probably do something cheaper than running stg, such as checking if .git/patches/<branchname> exists. > So it's not very clear to me what does it mean "switching from > non-stgit branch to a stgit one" Switching from a branch where "stg init" hasn't been run, to one where it has. -- 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