From: Jeff King Date: Sat, 11 May 2013 16:15:59 +0000 (+0200) Subject: refactor "ref->merge" flag X-Git-Tag: v1.8.4-rc0~229^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/900f2814b8da951a450f5762dabb1b248dd77abc?hp=900f2814b8da951a450f5762dabb1b248dd77abc refactor "ref->merge" flag Each "struct ref" has a boolean flag that is set by the fetch code to determine whether the ref should be marked as "not-for-merge" or not when we write it out to FETCH_HEAD. It would be useful to turn this boolean into a tri-state, with the third state meaning "do not bother writing it out to FETCH_HEAD at all". That would let us add extra refs to the set of refs to be stored (e.g., to store copies of things we fetched) without impacting FETCH_HEAD. This patch turns it into an enum that covers the tri-state case, and hopefully makes the code more explicit and easier to read. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano ---