• J
    Rationalize output selection in rev-parse. · 4866ccf0
    Junio C Hamano 提交于
    Earlier rounds broke 'whatchanged -p'.  In attempting to fix this,
    make two axis of output selection in rev-parse orthogonal:
    
      --revs-only	tells it not to output things that are not revisions nor
    		flags that rev-list would take.
      --no-revs	tells it not to output things that are revisions or
    		flags that rev-list would take.
      --flags	tells it not to output parameters that do not start with
    		a '-'.
      --no-flags	tells it not to output parameters that starts with a '-'.
    
    So for example 'rev-parse --no-revs -p arch/i386' would yield '-p arch/i386',
    while 'rev-parse --no-revs --flags -p archi/i386' would give just '-p'.
    
    Also the meaning of --verify has been made stronger.  It now rejects
    anything but a single valid rev argument.  Earlier it passed some flags
    through without complaining.
    Signed-off-by: NJunio C Hamano <junkio@cox.net>
    4866ccf0
rev-parse.c 4.2 KB