Re: [PATCH] push: Alias pushurl from push rewrites

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Mar 2013 15:56:56 -0700
Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:

> Rob Hoelz wrote:
> 
> > My mistake; I had not seen it!  I thought you may have found a bug
> > in my implementation, so I wanted to double check. =)
> 
> Well, I had found an unfortunate consequence of the implementation
> that uses an unnecessary copy. :)
> 
> Will follow up to the updated patch.
> 

I actually wanted to talk about the copy thing.  I realize that this
could have been avoided by simply saving a pointer to the old string
and performing a comparison, but I figured if the implementation for
alias_url were changed in the future to use realloc or something, it
could potentially return the original char * with its contents
altered.  So, by copying the string, we can avoid strange bugs in the
future.

-Rob
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]