Skip to content
  • Jonathan Nieder's avatar
    ll-merge: make flag easier to populate · 73cf7f71
    Jonathan Nieder authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    ll_merge() takes its options in a flag word, which has a few
    advantages:
    
     - options flags can be cheaply passed around in registers, while
       an option struct passed by pointer cannot;
    
     - callers can easily pass 0 without trouble for no options,
       while an option struct passed by value would not allow that.
    
    The downside is that code to populate and access the flag word can be
    somewhat opaque.  Mitigate that with a few macros.
    
    Cc: Avery Pennarun <apenwarr@gmail.com>
    Cc: Bert Wesarg <bert.wesarg@googlemail.com>
    Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    73cf7f71