On 06/17/2014 05:53 PM, Ronnie Sahlberg wrote:
> Making errno from write_ref_sha1() meaningful, which should fix
> 
> * a bug in "git checkout -b" where it prints strerror(errno)
>   despite errno possibly being zero or clobbered
> 
> * a bug in "git fetch"'s s_update_ref, which trusts the result of an
>   errno == ENOTDIR check to detect D/F conflicts
> 
> Signed-off-by: Ronnie Sahlberg <sahlb...@google.com>
> ---
>  refs.c | 29 ++++++++++++++++++++++++-----
>  1 file changed, 24 insertions(+), 5 deletions(-)
> 
> diff --git a/refs.c b/refs.c
> index 211429d..1f2eb24 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -1979,6 +1979,7 @@ static int remove_empty_directories(const char *file)
>       result = remove_dir_recursively(&path, REMOVE_DIR_EMPTY_ONLY);
>       save_errno = errno;
>  
> +     errno = save_errno;
>       strbuf_release(&path);
>       errno = save_errno;

This new line looks like an accident.

> [...]

Michael

-- 
Michael Haggerty
mhag...@alum.mit.edu
http://softwareswirl.blogspot.com/
--
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

Reply via email to