Re: [PATCH] unpack-trees: don't shift conflicts left and right

2013-06-18 Thread René Scharfe
Am 18.06.2013 01:42, schrieb Junio C Hamano: But the need to go all the way up in the recursive callframes to get the union of bitmask to get conflicts looks somewhat ugly. Yes, that's not pretty. It's like make_traverse_path in that regard, though, so it fits in somehow. I suspect the *rea

Re: [PATCH] unpack-trees: don't shift conflicts left and right

2013-06-17 Thread Junio C Hamano
René Scharfe writes: > How about going into the opposite direction and moving df_conflicts > handling more into traverse_tree? If the function saved the mask > and dirmask in traverse_info then callbacks could calculate the > cumulated d/f conflicts by walking the info chain, similar to how > ma

Re: [PATCH] unpack-trees: don't shift conflicts left and right

2013-06-17 Thread Junio C Hamano
René Scharfe writes: > Am 17.06.2013 22:44, schrieb Junio C Hamano: >> >> ... Or, perhaps we can >> >> - add df_conflict to struct unpack_trees_options; >> >> - have traverse_info->data point at struct unpack_trees_options as >> before; and >> >> - save the old value of o->df_confl

Re: [PATCH] unpack-trees: don't shift conflicts left and right

2013-06-17 Thread René Scharfe
Am 17.06.2013 22:44, schrieb Junio C Hamano: > René Scharfe writes: > >>> The information is only useful for the unpack_trees callback, and >>> "info->data" is a more appropriate place to hang such a callback >>> specific data. >>> >>> Perhaps we should use info->data field to point at >>> >>>

Re: [PATCH] unpack-trees: don't shift conflicts left and right

2013-06-17 Thread René Scharfe
Am 17.06.2013 22:44, schrieb Junio C Hamano: > René Scharfe writes: > >>> The information is only useful for the unpack_trees callback, and >>> "info->data" is a more appropriate place to hang such a callback >>> specific data. >>> >>> Perhaps we should use info->data field to point at >>> >>>

Re: [PATCH] unpack-trees: don't shift conflicts left and right

2013-06-17 Thread Junio C Hamano
René Scharfe writes: >> The information is only useful for the unpack_trees callback, and >> "info->data" is a more appropriate place to hang such a callback >> specific data. >> >> Perhaps we should use info->data field to point at >> >> struct { >> struct unpack_trees_option

Re: [PATCH] unpack-trees: don't shift conflicts left and right

2013-06-17 Thread René Scharfe
Am 16.06.2013 02:56, schrieb Junio C Hamano: > One thing renaming df_conficts to conflicts really proves is that > this field is not used by the traverse_trees machinery at all. > > Before this patch, the bits in conflicts (now df_conflicts) mask had > the semantics that is not consistent with the

Re: [PATCH] unpack-trees: don't shift conflicts left and right

2013-06-15 Thread Junio C Hamano
René Scharfe writes: > If o->merge is set, the struct traverse_info member conflicts is shifted > left in unpack_callback, then passed through traverse_trees_recursive > to unpack_nondirectories, where it is shifted right before use. > @@ -807,13 +802,6 @@ static int unpack_callback(int n, uns

[PATCH] unpack-trees: don't shift conflicts left and right

2013-06-15 Thread René Scharfe
If o->merge is set, the struct traverse_info member conflicts is shifted left in unpack_callback, then passed through traverse_trees_recursive to unpack_nondirectories, where it is shifted right before use. Stop the shifting and just pass the conflict bit mask as is. Rename the member to df_confl