Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Error messages from VCS_INFO_get_data_git



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 24.05.2015 22:24, brian m. carlson wrote:

> I'm using zsh 5.0.7 and I'm seeing some error messages when I use git
> rebase -m with vcs_info.  One is already fixed in git, and if I copy the
> git version of the file over my existing copy, I get the following:
> 
>   grep: .git/rebase-merge/git-rebase-todo: No such file or directory
> 
> I'm using Git 2.4.0, and that file doesn't appear to exist in newer Git
> versions.  I've also tried with Git 2.1.4, and it appears to be absent
> there as well.

The file is used with interacive rebasing ("git rebase -i"), see
git-rebase--interactive.sh in Git's source.

Were you running into a conflict with "git rebase -m", or used some other
option that would have aborted/interrupted it?
Does it happen for every "git rebase -m"?

The code path is only triggered when ".git/rebase-merge" exists:

    elif [[ -d "${gitdir}/rebase-merge" ]]; then

And that's what Git (2.4.1+) checks/uses in wt-status.c:

	} else if (!stat(git_path("rebase-merge"), &st)) {
		if (!stat(git_path("rebase-merge/interactive"), &st))
			state->rebase_interactive_in_progress = 1;
		else
			state->rebase_in_progress = 1;
		state->branch = read_and_strip_branch("rebase-merge/head-name");
		state->onto = read_and_strip_branch("rebase-merge/onto");

> The fix is probably as simple as redirecting stderr in that case to
> /dev/null.  A patch to do exactly that is attached.

Thanks, but I think there should be a "test -f ..." instead.


Regards,
Daniel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iD8DBQFVY2RHfAK/hT/mPgARAiWQAJ4xK86pt5NBgUEComofKjzCwQO0VACfel5v
yMKm1XHzR5oQB79/btB7yn0=
=JEo/
-----END PGP SIGNATURE-----



Messages sorted by: Reverse Date, Date, Thread, Author