Re: [RFC v2] revision: Add --sticky-default option

2018-10-18 Thread Andreas Gruenbacher
On Thu, 18 Oct 2018 at 08:53, Jeff King wrote: > On Wed, Oct 17, 2018 at 03:49:47PM +0200, Andreas Gruenbacher wrote: > > @@ -2431,7 +2446,11 @@ int setup_revisions(int argc, const char **argv, > > struct rev_info *revs, struct s > > opt->tweak(revs, opt); > > if

Re: [RFC v2] revision: Add --sticky-default option

2018-10-18 Thread Jeff King
On Wed, Oct 17, 2018 at 03:49:47PM +0200, Andreas Gruenbacher wrote: > @@ -2431,7 +2446,11 @@ int setup_revisions(int argc, const char **argv, > struct rev_info *revs, struct s > opt->tweak(revs, opt); > if (revs->show_merge) > prepare_show_merge(revs); > -

[RFC v2] revision: Add --sticky-default option

2018-10-17 Thread Andreas Gruenbacher
Some commands like 'log' default to HEAD if no other revisions are specified on the command line or otherwise. Currently, excludes (^) cancel out that default, so when a command only excludes revisions (e.g., 'git log ^origin/master'), it will produce no output. With the --sticky-default option,