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

(unknown)

From
David Aguilar <davvid@gmail.com>
Date
Mar 30, 2009, 05:03 UTC
Message-ID
<1238389428-69328-1-git-send-email-davvid@gmail.com>

As promised, here is the patch series that removes the duplicate code between git-difftool and git-mergetool.

This is based on top of Junio's "pu" branch and is a continuation of the recent difftool series.

I created a new git-sh-tools shell lib for holding the common functions. If anyone thinks I should have placed the functions in git-sh-setup instead then just let me know.

Here's a total diffstat. If it wasn't for the documentation and replacing the mixed spaces/tabs with all-tabs in git-mergetool then we would have seen a lot more happy removals.

 .gitignore                     |    1 +
 Documentation/git-sh-tools.txt |   52 ++++
 Makefile                       |    1 +
 command-list.txt               |    1 +
 git-difftool-helper.sh         |  112 +-------
 git-mergetool.sh               |  639 ++++++++++++++++------------------------
 git-sh-tools.sh                |  181 ++++++++++++
 7 files changed, 506 insertions(+), 481 deletions(-)
GIT:
From: David Aguilar <davvid@gmail.com>
Subject: Refactor git-{diff,merge}tool to remove duplicate code
In-Reply-To: 
Next: David Aguilar
Message 1 of 19 in “(unknown)”
  1. David AguilarMar 30, 2009
  2. 1/8 mergetool: use tabs consistentlyDavid Aguilar, Mar 30, 2009
  3. 2/8 mergetool: use $( ... ) instead of `backticks`David Aguilar, Mar 30, 2009
  4. 3/8 sh-tools: add a git-sh-tools shell helper scriptDavid Aguilar, Mar 30, 2009
  5. 4/8 mergetool: refactor git-mergetool to use git-sh-toolsDavid Aguilar, Mar 30, 2009
  6. 5/8 difftool: refactor git-difftool to use git-sh-toolsDavid Aguilar, Mar 30, 2009
  7. 6/8 sh-tools: add a run_merge_tool functionDavid Aguilar, Mar 30, 2009
  8. 7/8 mergetool: refactor git-mergetool to use run_merge_toolDavid Aguilar, Mar 30, 2009
  9. 8/8 difftool: refactor git-difftool-helper to use run_merge_toolDavid Aguilar, Mar 30, 2009
  10. Markus HeidelbergMar 30, 2009
  11. Markus HeidelbergMar 30, 2009
  12. David AguilarMar 30, 2009
  13. Junio C HamanoMar 30, 2009
  14. David AguilarMar 30, 2009
  15. Charles BaileyMar 30, 2009
  16. David AguilarMar 31, 2009
  17. Junio C HamanoApr 1, 2009
  18. Markus HeidelbergMar 30, 2009
  19. Junio C HamanoMar 30, 2009

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.