Hi,
On Sat, 1 Dec 2007, Johannes Schindelin wrote:
On Sat, 1 Dec 2007, Johannes Schindelin wrote:
quoted
Will investigate right now,
The problem is that "git <command>" will call execv_git_cmd() for
non-builtins, which in turn will execute "git <command>", ... ad
infinitum.
Okay, I bit the apple and tried to move the builtins into the library, and
rename handle_internal_command into execv_git_builtin(), moving it into
exec-cmd.c.
Big mistake.
Why? Because there is at least one caller, git-bundle, which relies on
execv_git_cmd() _not_ reusing all those "nice" one-shot static variables,
like for example the object hashmap and the objects themselves.
Now, it seems that we can get away for the moment with just introducing an
object release mechanism and calling that in execv_git_builtin() before
calling a builtin function, because the existing callers do not rely on
more than a cleanup of the objects.
But it is hairy, since it is such an essential part of git. And since I
was utterly tired while preparing this patch series. So I suggest maybe
putting this into pu, but no further for the moment. I will use the
patched git in the next days, though, to catch breakages (hopefully).
Ciao,
Dscho