git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] specify commit by negative pattern
@ 2015-06-03 20:54 Will Palmer
  2015-06-03 20:54 ` [PATCH 1/2] test for '!' handling in rev-parse's named commits Will Palmer
  2015-06-03 20:54 ` [PATCH 2/2] object name: introduce '^{/!<negative pattern>}' notation Will Palmer
  0 siblings, 2 replies; 7+ messages in thread
From: Will Palmer @ 2015-06-03 20:54 UTC (permalink / raw)
  To: git; +Cc: Will Palmer

add support for negative pattern matching in @^{/<pattern>} style
revision specifiers. So now you can find the first commit whose message
doesn't match a pattern, complementing the existing positive matching.
e.g.:

    $ git rebase -i @^{/!^WIP}

My use-case is in having a "work, work, work, rebase, push"-style
workflow, which generates a lot of "WIP foo" commits. While rebasing is
usually handled via "git rebase -i origin/master", occasionally I will
already have several "good, but not yet ready to push" commits hanging
around while I finish work on related commits. In these situations, the
ability to quickly "git diff @^{/!^WIP}" to get an overview of all
changes "since the last one I was happy with", can be useful.

Reading through the history of this type of revision specifier, it feels
like a negative match was always thought of as potentially useful
someday, but didn't fit well with the original patch's limitations
(namely: always searching across all refs).

Will Palmer (2):
  test for '!' handling in rev-parse's named commits
  object name: introduce '^{/!<negative pattern>}' notation

 Documentation/revisions.txt |  7 ++++---
 sha1_name.c                 | 22 ++++++++++++++++------
 t/t1511-rev-parse-caret.sh  | 45 ++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 64 insertions(+), 10 deletions(-)

-- 
2.3.0.rc1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-04 17:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 20:54 [PATCH 0/2] specify commit by negative pattern Will Palmer
2015-06-03 20:54 ` [PATCH 1/2] test for '!' handling in rev-parse's named commits Will Palmer
2015-06-03 21:52   ` Junio C Hamano
2015-06-03 22:44     ` Will Palmer
2015-06-04 17:09       ` Junio C Hamano
2015-06-03 23:12     ` Junio C Hamano
2015-06-03 20:54 ` [PATCH 2/2] object name: introduce '^{/!<negative pattern>}' notation Will Palmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).