Matthieu Moy wrote:
> Because "git rebase" needs multiple runs in case of conflicts. You have
> to store the information somewhere in the filesystem, not in a variable.
> What you need to store is whether you need to unstash, and where you are
> in the process (in Junio's version, you may be doing the actual rebase,
> or fixing conflicts in index state application, or fixing conflicts in
> tree state application, or done). Storing what you have to do and where
> you are in the process really sounds like a job for the instruction
> sheet, no?
No. Ultimately, the entry point of all these invocations is
git-rebase.sh. The plan is to refactor calls from git-rebase.sh to
git-rebase--*.sh scripts so that those scripts return control to
git-rebase.sh, which will be the final exit point. The logic is very
simple: On the very first invocation of rebase (ie. no existing rebase
in progress), stash. If the return statement from the specific rebase
script is 1 (which means that there are conflicts to be resolved),
exit as usual. If it is 0 (which means that the rebase completely
successfully), pop the stash before exiting as usual.
What's so complicated about that? I'm against leaking the autostash
implementation detail into specific rebases, because I value a clean
and pleasant implementation over everything else.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html