Re: On undoing a forced push
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Jun 9, 2015, 15:00 UTC
- Message-ID
- <20150609150035.GA102463@vauxhall.crustytoothpaste.net>
- In-Reply-To
- <20150609121221.GA14126@lanh>
On Tue, Jun 09, 2015 at 07:12:21PM +0700, Duy Nguyen wrote:
Show 10 quoted lines
> diff --git a/transport.c b/transport.c
> index f080e93..6bd6a64 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -657,16 +657,17 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)
> "[new branch]"),
> ref, ref->peer_ref, NULL, porcelain);
> else {
> - char quickref[84];
> + char quickref[104];You've increased this by 20, but you're adding 40 characters to the strcpy. Are you sure that's enough?
Also, you might consider writing this in terms of GIT_SHA1_HEXSZ, as it will be more obvious that this depends on that value. If you don't now, I will later.
-- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187