Re: Bug? "git branch" failing to list all branches

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Simo Melenius
Date: Wednesday, June 2, 2010 - 11:00 pm

On 3 June 2010 07:22, Jonathan Nieder <jrnieder@gmail.com> wrote:

I have been working with such set of repositories that most of them
have one or two broken refs. I probably saw it but didn't care because
it was a known issue. If I had called git branch from a script and
piped the output somewhere while relying on exit status, I wouldn't
have noticed anything.


My change doesn't change the current behaviour. At least git 1.7.0.4
didn't give a nonzero exit status either. It would be good if it did.

I could add that to my patch. I'm, however, unsure of what's the best
way to communicate the error from append_ref() to cmd_branch(). A
static variable in branch.c would of course do.

However, if the git codebase has somewhere a global mechanism for
signalling errors by, for example, raising some flag when error() is
called, using that mechanism would be better, right?


Since this only concerns the printing of branches, often for
interactive viewing or bash completion, and does not affect any of the
operations that modify the repository, I think it's sufficient that
the error message is still readable from stderr for those who are
interested.


Yeah, I have a kosher patch locally. I just copypasted the diff part
here for discussion.


Simo

-- 
() Today is the car of the cdr of your life.
/\ http://arc.pasp.de/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Bug? "git branch" failing to list all branches, Simo Melenius, (Wed Jun 2, 11:00 pm)
Re: Bug? &quot;git branch&quot; failing to list all branches, Jonathan Nieder, (Wed Jun 2, 11:55 pm)