git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v1 07/25] contrib: remove 'git-jump'

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 9, 2014, 00:58 UTC
Message-ID
<1399597116-1851-8-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1399597116-1851-1-git-send-email-felipe.contreras@gmail.com>
No activity, no tests.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/git-jump/README   | 92 -----------------------------------------------
 contrib/git-jump/git-jump | 69 -----------------------------------
 2 files changed, 161 deletions(-)
 delete mode 100644 contrib/git-jump/README
 delete mode 100755 contrib/git-jump/git-jump
diff --git a/contrib/git-jump/README b/contrib/git-jump/README
deleted file mode 100644
index 1cebc32..0000000
--- a/contrib/git-jump/README
+++ /dev/null
@@ -1,92 +0,0 @@
-git-jump
-========
-
-Git-jump is a script for helping you jump to "interesting" parts of your
-project in your editor. It works by outputting a set of interesting
-spots in the "quickfix" format, which editors like vim can use as a
-queue of places to visit (this feature is usually used to jump to errors
-produced by a compiler). For example, given a diff like this:
-
-------------------------------------
-diff --git a/foo.c b/foo.c
-index a655540..5a59044 100644
---- a/foo.c
-+++ b/foo.c
-@@ -1,3 +1,3 @@
- int main(void) {
--  printf("hello word!\n");
-+  printf("hello world!\n");
- }
------------------------------------
-
-git-jump will feed this to the editor:
-
------------------------------------
-foo.c:2: printf("hello word!\n");
------------------------------------
-
-Obviously this trivial case isn't that interesting; you could just open
-`foo.c` yourself. But when you have many changes scattered across a
-project, you can use the editor's support to "jump" from point to point.
-
-Git-jump can generate three types of interesting lists:
-
-  1. The beginning of any diff hunks.
-
-  2. The beginning of any merge conflict markers.
-
-  3. Any grep matches.
-
-
-Using git-jump
---------------
-
-To use it, just drop git-jump in your PATH, and then invoke it like
-this:
-
---------------------------------------------------
-# jump to changes not yet staged for commit
-git jump diff
-
-# jump to changes that are staged for commit; you can give
-# arbitrary diff options
-git jump diff --cached
-
-# jump to merge conflicts
-git jump merge
-
-# jump to all instances of foo_bar
-git jump grep foo_bar
-
-# same as above, but case-insensitive; you can give
-# arbitrary grep options
-git jump grep -i foo_bar
---------------------------------------------------
-
-
-Related Programs
-----------------
-
-You can accomplish some of the same things with individual tools. For
-example, you can use `git mergetool` to start vimdiff on each unmerged
-file. `git jump merge` is for the vim-wielding luddite who just wants to
-jump straight to the conflict text with no fanfare.
-
-As of git v1.7.2, `git grep` knows the `--open-files-in-pager` option,
-which does something similar to `git jump grep`. However, it is limited
-to positioning the cursor to the correct line in only the first file,
-leaving you to locate subsequent hits in that file or other files using
-the editor or pager. By contrast, git-jump provides the editor with a
-complete list of files and line numbers for each match.
-
-
-Limitations
------------
-
-This scripts was written and tested with vim. Given that the quickfix
-format is the same as what gcc produces, I expect emacs users have a
-similar feature for iterating through the list, but I know nothing about
-how to activate it.
-
-The shell snippets to generate the quickfix lines will almost certainly
-choke on filenames with exotic characters (like newlines).
diff --git a/contrib/git-jump/git-jump b/contrib/git-jump/git-jump
deleted file mode 100755
index dc90cd6..0000000
--- a/contrib/git-jump/git-jump
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-usage() {
-	cat <<\EOF
-usage: git jump <mode> [<args>]
-
-Jump to interesting elements in an editor.
-The <mode> parameter is one of:
-
-diff: elements are diff hunks. Arguments are given to diff.
-
-merge: elements are merge conflicts. Arguments are ignored.
-
-grep: elements are grep hits. Arguments are given to grep.
-EOF
-}
-
-open_editor() {
-	editor=`git var GIT_EDITOR`
-	eval "$editor -q \$1"
-}
-
-mode_diff() {
-	git diff --no-prefix --relative "$@" |
-	perl -ne '
-	if (m{^\+\+\+ (.*)}) { $file = $1; next }
-	defined($file) or next;
-	if (m/^@@ .*\+(\d+)/) { $line = $1; next }
-	defined($line) or next;
-	if (/^ /) { $line++; next }
-	if (/^[-+]\s*(.*)/) {
-		print "$file:$line: $1\n";
-		$line = undef;
-	}
-	'
-}
-
-mode_merge() {
-	git ls-files -u |
-	perl -pe 's/^.*?\t//' |
-	sort -u |
-	while IFS= read fn; do
-		grep -Hn '^<<<<<<<' "$fn"
-	done
-}
-
-# Grep -n generates nice quickfix-looking lines by itself,
-# but let's clean up extra whitespace, so they look better if the
-# editor shows them to us in the status bar.
-mode_grep() {
-	git grep -n "$@" |
-	perl -pe '
-	s/[ \t]+/ /g;
-	s/^ *//;
-	'
-}
-
-if test $# -lt 1; then
-	usage >&2
-	exit 1
-fi
-mode=$1; shift
-
-trap 'rm -f "$tmp"' 0 1 2 3 15
-tmp=`mktemp -t git-jump.XXXXXX` || exit 1
-type "mode_$mode" >/dev/null 2>&1 || { usage >&2; exit 1; }
-"mode_$mode" "$@" >"$tmp"
-test -s "$tmp" || exit 0
-open_editor "$tmp"
-- 
1.9.2+fc1.27.gbce2056
Previous: Tim HeniganNext: Jeff King
Message 28 of 83 in “contrib: cleanup”
  1. 00/25 contrib: cleanupFelipe Contreras, May 9, 2014
  2. 02/25 contrib: remove 'hg-to-git'Felipe Contreras, May 9, 2014
  3. Miklos VajnaMay 9, 2014
  4. 03/25 contrib: remove 'stats'Felipe Contreras, May 9, 2014
  5. 04/25 contrib: remove 'buildsystems'Felipe Contreras, May 9, 2014
  6. Erik Faye-LundMay 9, 2014
  7. Felipe ContrerasMay 9, 2014
  8. Erik Faye-LundMay 9, 2014
  9. Felipe ContrerasMay 9, 2014
  10. Erik Faye-LundMay 9, 2014
  11. Felipe ContrerasMay 9, 2014
  12. Erik Faye-LundMay 9, 2014
  13. Felipe ContrerasMay 9, 2014
  14. Erik Faye-LundMay 9, 2014
  15. David KastrupMay 9, 2014
  16. Felipe ContrerasMay 9, 2014
  17. David KastrupMay 9, 2014
  18. Felipe ContrerasMay 9, 2014
  19. David KastrupMay 9, 2014
  20. Jonathan NiederMay 9, 2014
  21. 05/25 contrib: remove 'convert-objects'Felipe Contreras, May 9, 2014
  22. 06/25 contrib: remove 'diffall'Felipe Contreras, May 9, 2014
  23. Tim HeniganMay 9, 2014
  24. Jonathan NiederMay 9, 2014
  25. Tim HeniganMay 9, 2014
  26. Jonathan NiederMay 9, 2014
  27. Tim HeniganMay 9, 2014
  28. 07/25 contrib: remove 'git-jump'Felipe Contreras, May 9, 2014
  29. Jeff KingMay 9, 2014
  30. Felipe ContrerasMay 9, 2014
  31. Jeff KingMay 9, 2014
  32. Felipe ContrerasMay 9, 2014
  33. Junio C HamanoMay 9, 2014
  34. 08/25 contrib: remove 'git-shell-commands'Felipe Contreras, May 9, 2014
  35. 09/25 contrib: remove 'gitview'Felipe Contreras, May 9, 2014
  36. 10/25 contrib: reomve 'thunderbird-patch-inline'Felipe Contreras, May 9, 2014
  37. 11/25 contrib: remove 'workdir'Felipe Contreras, May 9, 2014
  38. 12/25 contrib: remove 'vim'Felipe Contreras, May 9, 2014
  39. Jeff KingMay 9, 2014
  40. Jonathan NiederMay 9, 2014
  41. 13/25 contrib: remove 'svn-fe'Felipe Contreras, May 9, 2014
  42. 14/25 contrib: remove 'rerere-train'Felipe Contreras, May 9, 2014
  43. 15/25 contrib: remove 'remotes2config'Felipe Contreras, May 9, 2014
  44. 16/25 contrib: remove 'persistent-https'Felipe Contreras, May 9, 2014
  45. 17/25 contrib: remove 'git-resurrect'Felipe Contreras, May 9, 2014
  46. 18/25 contrib: remove 'emacs'Felipe Contreras, May 9, 2014
  47. 19/25 contrib: remove 'diff-highlight'Felipe Contreras, May 9, 2014
  48. Jeff KingMay 9, 2014
  49. Felipe ContrerasMay 9, 2014
  50. Stefan BellerMay 9, 2014
  51. Felipe ContrerasMay 9, 2014
  52. Junio C HamanoMay 9, 2014
  53. Felipe ContrerasMay 9, 2014
  54. Junio C HamanoMay 9, 2014
  55. Felipe ContrerasMay 9, 2014
  56. Junio C HamanoMay 9, 2014
  57. Felipe ContrerasMay 9, 2014
  58. 20/25 contrib: remove 'contacts'Felipe Contreras, May 9, 2014
  59. brian m. carlsonMay 10, 2014
  60. Felipe ContrerasMay 10, 2014
  61. 22/25 contrib: remove 'fast-import'Felipe Contreras, May 9, 2014
  62. 24/25 contrib: remove 'hooks'Felipe Contreras, May 9, 2014
  63. Martin LanghoffMay 9, 2014
  64. Johannes SixtMay 9, 2014
  65. Felipe ContrerasMay 9, 2014
  66. Stefan BellerMay 9, 2014
  67. Jeff KingMay 9, 2014
  68. Felipe ContrerasMay 9, 2014
  69. Martin LanghoffMay 9, 2014
  70. Felipe ContrerasMay 9, 2014
  71. Felipe ContrerasMay 9, 2014
  72. Felipe ContrerasMay 9, 2014
  73. Matthieu MoyMay 9, 2014
  74. Felipe ContrerasMay 9, 2014
  75. Stefan BellerMay 9, 2014
  76. Alexandre JulliardMay 9, 2014
  77. Felipe ContrerasMay 9, 2014
  78. Michael HaggertyMay 9, 2014
  79. David KastrupMay 9, 2014
  80. Michael HaggertyMay 9, 2014
  81. Felipe ContrerasMay 9, 2014
  82. James DenholmMay 9, 2014
  83. Felipe ContrerasMay 9, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.