Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 14/14] Build in merge

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:53

Johannes Schindelin [off-list ref] writes:
But given that you seem so sick and tired of string_list, and rather have 
a code duplication, I will not argue to that end anymore.
You are probably very confused if you think I am saying I'd rather have
duplication.

Look at "unsorted_path_list_lookup()" in builtin-merge.c and think again.
Look at "path_list_append_strategy()" in builtin-merge.c and think again.

If you are adding the same amount of code _anyway_, why not write using
more appropriate data structure for the job?

The path_list has its uses.  It's wonderful when you have existing
structures that you would need to keep in core anyway and being able to
look them up via string keys.  But that does not mean it is (nor should be
"improved" to be) a good match for other forms of (ab)uses.

The way it was used by initializing with pointer to a static array
location is clearly a misuse.  When using ->util field to store things
other than pointers to preexisting structures, the use of the API becomes
clunky and we discussed this issue about another patch.  That's all I was
saying.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help