Thread (8 messages) flat view 8 messages, 2 authors, 2016-06-15

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

From: Rob Hoelz <hidden>
Date: 2016-06-15 22:56:33

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help