Re: [PATCH 14/14] Build in merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux