On Wed, 27 Mar 2013 15:56:56 -0700
Jonathan Nieder [off-list ref] wrote:
Rob Hoelz wrote:
quoted
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