{"thread":{"id":"7241","subject":"[GIT PULL] Please pull mergetool.git","startedAt":"2007-03-14T01:15:22Z","lastAt":"2007-03-14T09:55:37Z","messageCount":6,"participants":["Theodore Ts'o","Shawn O. Pearce","Theodore Tso","Junio C Hamano","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"37046","messageId":"E1HRI5K-0008T9-9e@candygram.thunk.org","threadId":"7241","inReplyTo":null,"subject":"[GIT PULL] Please pull mergetool.git","fromName":"Theodore Ts'o","fromEmail":"tytso@mit.edu","sentAt":"2007-03-14T01:15:22Z","receivedAt":"2007-03-14T01:15:22Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"Hi Junio,\n\n\tPer our previous email conversation, I've cleaned done my final\ncleanups before being ready to submit mergetool for inclusion, and\nrebased it to lastest changeset the git master branch.\n\n\tIn order to make this easier for me to send future features and\ncleanups, I've set up a repository on repo.or.cz.  So please pull from:\n\n\tgit://repo.or.cz/git/mergetool.git\n\nThe final patch that is the repository is attached.\n\n\t\t\t\t\t\t- Ted\n\nFrom: Theodore Ts'o <tytso@mit.edu>\nDate: Tue, 6 Mar 2007 00:05:16 -0500\nSubject: [PATCH] Add git-mergetool to run an appropriate merge conflict resolution program\n\nThe git-mergetool program can be used to automatically run an appropriate\nmerge resolution program to resolve merge conflicts.  It will automatically\nrun one of kdiff3, tkdiff, meld, xxdiff, or emacs emerge programs.\n\nSigned-off-by: \"Theodore Ts'o\" <tytso@mit.edu>\n---\n .gitignore                      |    1 +\n Documentation/config.txt        |    5 +\n Documentation/git-mergetool.txt |   46 +++++\n Makefile                        |    2 +-\n git-mergetool.sh                |  352 +++++++++++++++++++++++++++++++++++++++\n 5 files changed, 405 insertions(+), 1 deletions(-)\n create mode 100644 Documentation/git-mergetool.txt\n create mode 100755 git-mergetool.sh\n\ndiff --git a/.gitignore b/.gitignore\nindex 0eaba0a..27797d1 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -75,6 +75,7 @@ git-merge-ours\n git-merge-recursive\n git-merge-resolve\n git-merge-stupid\n+git-mergetool\n git-mktag\n git-mktree\n git-name-rev\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 5408dd6..aaae9ac 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -453,6 +453,11 @@ merge.summary::\n \tWhether to include summaries of merged commits in newly created\n \tmerge commit messages. False by default.\n \n+merge.tool::\n+\tControls which merge resolution program is used by\n+\tgitlink:git-mergetool[l].  Valid values are: \"kdiff3\", \"tkdiff\",\n+\t\"meld\", \"xxdiff\", \"emerge\"\n+\n merge.verbosity::\n \tControls the amount of output shown by the recursive merge\n \tstrategy.  Level 0 outputs nothing except a final error\ndiff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt\nnew file mode 100644\nindex 0000000..ae69a0e\n--- /dev/null\n+++ b/Documentation/git-mergetool.txt\n@@ -0,0 +1,46 @@\n+git-mergetool(1)\n+================\n+\n+NAME\n+----\n+git-mergetool - Run merge conflict resolution tools to resolve merge conflicts\n+\n+SYNOPSIS\n+--------\n+'git-mergetool' [--tool=<tool>] [<file>]...\n+\n+DESCRIPTION\n+-----------\n+\n+Use 'git mergetool' to run one of several merge utilities to resolve\n+merge conflicts.  It is typically run after gitlink:git-merge[1].\n+\n+If one or more <file> parameters are given, the merge tool program will\n+be run to resolve differences on each file.  If no <file> names are\n+specified, 'git mergetool' will run the merge tool program on every file\n+with merge conflicts.\n+\n+OPTIONS\n+-------\n+-t or --tool=<tool>::\n+\tUse the merge resolution program specified by <tool>.\n+\tValid merge tools are:\n+\tkdiff3, tkdiff, meld, xxdiff, and emerge.\n+\n+\tIf a merge resolution program is not specified, 'git mergetool'\n+\twill use the configuration variable merge.tool.  If the\n+\tconfiguration variable merge.tool is not set, 'git mergetool'\n+\twill pick a suitable default.\n+\n+Author\n+------\n+Written by Theodore Y Ts'o <tytso@mit.edu>\n+\n+Documentation\n+--------------\n+Documentation by Theodore Y Ts'o.\n+\n+GIT\n+---\n+Part of the gitlink:git[7] suite\n+\ndiff --git a/Makefile b/Makefile\nindex 1a51f84..45fe366 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -179,7 +179,7 @@ SCRIPT_SH = \\\n \tgit-clean.sh git-clone.sh git-commit.sh \\\n \tgit-fetch.sh git-gc.sh \\\n \tgit-ls-remote.sh \\\n-\tgit-merge-one-file.sh git-parse-remote.sh \\\n+\tgit-merge-one-file.sh git-mergetool.sh git-parse-remote.sh \\\n \tgit-pull.sh git-rebase.sh \\\n \tgit-repack.sh git-request-pull.sh git-reset.sh \\\n \tgit-sh-setup.sh \\\ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nnew file mode 100755\nindex 0000000..52386a5\n--- /dev/null\n+++ b/git-mergetool.sh\n@@ -0,0 +1,352 @@\n+#!/bin/sh\n+#\n+# This program resolves merge conflicts in git\n+#\n+# Copyright (c) 2006 Theodore Y. Ts'o\n+#\n+# This file is licensed under the GPL v2, or a later version\n+# at the discretion of Junio C Hammano.\n+#\n+\n+USAGE='[--tool=tool] [file to merge] ...'\n+SUBDIRECTORY_OK=Yes\n+. git-sh-setup\n+require_work_tree\n+\n+# Returns true if the mode reflects a symlink\n+function is_symlink () {\n+    test \"$1\" = 120000\n+}\n+\n+function local_present () {\n+    test -n \"$local_mode\"\n+}\n+\n+function remote_present () {\n+    test -n \"$remote_mode\"\n+}\n+\n+function base_present () {\n+    test -n \"$base_mode\"\n+}\n+\n+cleanup_temp_files () {\n+    if test \"$1\" = --save-backup ; then\n+\tmv -- \"$BACKUP\" \"$path.orig\"\n+\trm -f -- \"$LOCAL\" \"$REMOTE\" \"$BASE\"\n+    else\n+\trm -f -- \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$BACKUP\"\n+    fi\n+}\n+\n+function describe_file () {\n+    mode=\"$1\"\n+    branch=\"$2\"\n+    file=\"$3\"\n+\n+    echo -n \"    \"\n+    if test -z \"$mode\"; then\n+\techo -n \"'$path' was deleted\"\n+    elif is_symlink \"$mode\" ; then\n+\techo -n \"'$path' is a symlink containing '\"\n+\tcat \"$file\"\n+\techo -n \"'\"\n+    else\n+\tif base_present; then\n+\t    echo -n \"'$path' was created\"\n+\telse\n+\t    echo -n \"'$path' was modified\"\n+\tfi\n+    fi\n+    echo \" in the $branch branch\"\n+}\n+\n+\n+resolve_symlink_merge () {\n+    while /bin/true; do\n+\techo -n \"Use (r)emote or (l)ocal, or (a)bort? \"\n+\tread ans\n+\tcase \"$ans\" in\n+\t    [lL]*)\n+\t\tgit-checkout-index -f --stage=2 -- \"$path\"\n+\t\tgit-add -- \"$path\"\n+\t\tcleanup_temp_files --save-backup\n+\t\treturn\n+\t\t;;\n+\t   [rR]*)\n+\t\tgit-checkout-index -f --stage=3 -- \"$path\"\n+\t\tgit-add -- \"$path\"\n+\t\tcleanup_temp_files --save-backup\n+\t\treturn\n+\t\t;;\n+\t    [qQ]*)\n+\t\texit 1\n+\t\t;;\n+\t    esac\n+\tdone\n+}\n+\n+resolve_deleted_merge () {\n+    while /bin/true; do\n+\techo -n \"Use (m)odified or (d)eleted file, or (a)bort? \"\n+\tread ans\n+\tcase \"$ans\" in\n+\t    [mM]*)\n+\t\tgit-add -- \"$path\"\n+\t\tcleanup_temp_files --save-backup\n+\t\treturn\n+\t\t;;\n+\t   [dD]*)\n+\t\tgit-rm -- \"$path\"\n+\t\tcleanup_temp_files\n+\t\treturn\n+\t\t;;\n+\t    [qQ]*)\n+\t\texit 1\n+\t\t;;\n+\t    esac\n+\tdone\n+}\n+\n+merge_file () {\n+    path=\"$1\"\n+\n+    if test ! -f \"$path\" ; then\n+\techo \"$path: file not found\"\n+\texit 1\n+    fi\n+\n+    f=`git-ls-files -u -- \"$path\"`\n+    if test -z \"$f\" ; then\n+\techo \"$path: file does not need merging\"\n+\texit 1\n+    fi\n+\n+    BACKUP=\"$path.BACKUP.$$\"\n+    LOCAL=\"$path.LOCAL.$$\"\n+    REMOTE=\"$path.REMOTE.$$\"\n+    BASE=\"$path.BASE.$$\"\n+\n+    mv -- \"$path\" \"$BACKUP\"\n+    cp -- \"$BACKUP\" \"$path\"\n+\n+    base_mode=`git ls-files -u -- \"$path\" | awk '{if ($3==1) print $1;}'`\n+    local_mode=`git ls-files -u -- \"$path\" | awk '{if ($3==2) print $1;}'`\n+    remote_mode=`git ls-files -u -- \"$path\" | awk '{if ($3==3) print $1;}'`\n+\n+    base_present   && git cat-file blob \":1:$path\" > \"$BASE\" 2>/dev/null\n+    local_present  && git cat-file blob \":2:$path\" > \"$LOCAL\" 2>/dev/null\n+    remote_present && git cat-file blob \":3:$path\" > \"$REMOTE\" 2>/dev/null\n+\n+    if test -z \"$local_mode\" -o -z \"$remote_mode\"; then\n+\techo \"Deleted merge conflict for $path:\"\n+\tdescribe_file \"$local_mode\" \"local\" \"$LOCAL\"\n+\tdescribe_file \"$remote_mode\" \"remote\" \"$REMOTE\"\n+\tresolve_deleted_merge\n+\treturn\n+    fi\n+\n+    if is_symlink \"$local_mode\" || is_symlink \"$remote_mode\"; then\n+\techo \"Symlink merge conflict for $path:\"\n+\tdescribe_file \"$local_mode\" \"local\" \"$LOCAL\"\n+\tdescribe_file \"$remote_mode\" \"remote\" \"$REMOTE\"\n+\tresolve_symlink_merge\n+\treturn\n+    fi\n+\n+    echo \"Normal merge conflict for $path:\"\n+    describe_file \"$local_mode\" \"local\" \"$LOCAL\"\n+    describe_file \"$remote_mode\" \"remote\" \"$REMOTE\"\n+    echo -n \"Hit return to start merge resolution tool ($merge_tool): \"\n+    read ans\n+\n+    case \"$merge_tool\" in\n+\tkdiff3)\n+\t    if base_present ; then\n+\t\t(kdiff3 --auto --L1 \"$path (Base)\" -L2 \"$path (Local)\" --L3 \"$path (Remote)\" \\\n+\t\t    -o \"$path\" -- \"$BASE\" \"$LOCAL\" \"$REMOTE\" > /dev/null 2>&1)\n+\t    else\n+\t\t(kdiff3 --auto -L1 \"$path (Local)\" --L2 \"$path (Remote)\" \\\n+\t\t    -o \"$path\" -- \"$LOCAL\" \"$REMOTE\" > /dev/null 2>&1)\n+\t    fi\n+\t    status=$?\n+\t    if test \"$status\" -eq 0; then\n+\t\trm \"$BACKUP\"\n+\t    fi\n+\t    ;;\n+\ttkdiff)\n+\t    if base_present ; then\n+\t\ttkdiff -a \"$BASE\" -o \"$path\" -- \"$LOCAL\" \"$REMOTE\"\n+\t    else\n+\t\ttkdiff -o \"$path\" -- \"$LOCAL\" \"$REMOTE\"\n+\t    fi\n+\t    status=$?\n+\t    if test \"$status\" -eq 0; then\n+\t\tmv -- \"$BACKUP\" \"$path.orig\"\n+\t    fi\n+\t    ;;\n+\tmeld)\n+\t    touch \"$BACKUP\"\n+\t    meld -- \"$LOCAL\" \"$path\" \"$REMOTE\"\n+\t    if test \"$path\" -nt \"$BACKUP\" ; then\n+\t\tstatus=0;\n+\t    else\n+\t\twhile true; do\n+\t\t    echo \"$path seems unchanged.\"\n+\t\t    echo -n \"Was the merge successful? [y/n] \"\n+\t\t    read answer < /dev/tty\n+\t\t    case \"$answer\" in\n+\t\t\ty*|Y*) status=0; break ;;\n+\t\t\tn*|N*) status=1; break ;;\n+\t\t    esac\n+\t\tdone\n+\t    fi\n+\t    if test \"$status\" -eq 0; then\n+\t\tmv -- \"$BACKUP\" \"$path.orig\"\n+\t    fi\n+\t    ;;\n+\txxdiff)\n+\t    touch \"$BACKUP\"\n+\t    if base_present ; then\n+\t\txxdiff -X --show-merged-pane \\\n+\t\t    -R 'Accel.SaveAsMerged: \"Ctrl-S\"' \\\n+\t\t    -R 'Accel.Search: \"Ctrl+F\"' \\\n+\t\t    -R 'Accel.SearchForward: \"Ctrl-G\"' \\\n+\t\t    --merged-file \"$path\" -- \"$LOCAL\" \"$BASE\" \"$REMOTE\"\n+\t    else\n+\t\txxdiff -X --show-merged-pane \\\n+\t\t    -R 'Accel.SaveAsMerged: \"Ctrl-S\"' \\\n+\t\t    -R 'Accel.Search: \"Ctrl+F\"' \\\n+\t\t    -R 'Accel.SearchForward: \"Ctrl-G\"' \\\n+\t\t    --merged-file \"$path\" -- \"$LOCAL\" \"$REMOTE\"\n+\t    fi\n+\t    if test \"$path\" -nt \"$BACKUP\" ; then\n+\t\tstatus=0;\n+\t    else\n+\t\twhile true; do\n+\t\t    echo \"$path seems unchanged.\"\n+\t\t    echo -n \"Was the merge successful? [y/n] \"\n+\t\t    read answer < /dev/tty\n+\t\t    case \"$answer\" in\n+\t\t\ty*|Y*) status=0; break ;;\n+\t\t\tn*|N*) status=1; break ;;\n+\t\t    esac\n+\t\tdone\n+\t    fi\n+\t    if test \"$status\" -eq 0; then\n+\t\tmv -- \"$BACKUP\" \"$path.orig\"\n+\t    fi\n+\t    ;;\n+\temerge)\n+\t    if base_present ; then\n+\t\temacs -f emerge-files-with-ancestor-command \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$path\"\n+\t    else\n+\t\temacs -f emerge-files-command \"$LOCAL\" \"$REMOTE\" \"$path\"\n+\t    fi\n+\t    status=$?\n+\t    if test \"$status\" -eq 0; then\n+\t\tmv -- \"$BACKUP\" \"$path.orig\"\n+\t    fi\n+\t    ;;\n+    esac\n+    if test \"$status\" -ne 0; then\n+\techo \"merge of $path failed\" 1>&2\n+\tmv -- \"$BACKUP\" \"$path\"\n+\texit 1\n+    fi\n+    git add -- \"$path\"\n+    cleanup_temp_files\n+}\n+\n+while case $# in 0) break ;; esac\n+do\n+    case \"$1\" in\n+\t-t|--tool*)\n+\t    case \"$#,$1\" in\n+\t\t*,*=*)\n+\t\t    merge_tool=`expr \"z$1\" : 'z-[^=]*=\\(.*\\)'`\n+\t\t    ;;\n+\t\t1,*)\n+\t\t    usage ;;\n+\t\t*)\n+\t\t    merge_tool=\"$2\"\n+\t\t    shift ;;\n+\t    esac\n+\t    ;;\n+\t--)\n+\t    break\n+\t    ;;\n+\t-*)\n+\t    usage\n+\t    ;;\n+\t*)\n+\t    break\n+\t    ;;\n+    esac\n+    shift\n+done\n+\n+if test -z \"$merge_tool\"; then\n+    merge_tool=`git-config merge.tool`\n+    if test $merge_tool = kdiff3 -o $merge_tool = tkdiff -o \\\n+\t$merge_tool = xxdiff -o $merge_tool = meld ; then\n+\tunset merge_tool\n+    fi\n+fi\n+\n+if test -z \"$merge_tool\" ; then\n+    if type kdiff3 >/dev/null 2>&1 && test -n \"$DISPLAY\"; then\n+\tmerge_tool=\"kdiff3\";\n+    elif type tkdiff >/dev/null 2>&1 && test -n \"$DISPLAY\"; then\n+\tmerge_tool=tkdiff\n+    elif type xxdiff >/dev/null 2>&1 && test -n \"$DISPLAY\"; then\n+\tmerge_tool=xxdiff\n+    elif type meld >/dev/null 2>&1 && test -n \"$DISPLAY\"; then\n+\tmerge_tool=meld\n+    elif type emacs >/dev/null 2>&1; then\n+\tmerge_tool=emerge\n+    else\n+\techo \"No available merge resolution programs available.\"\n+\texit 1\n+    fi\n+fi\n+\n+case \"$merge_tool\" in\n+    kdiff3|tkdiff|meld|xxdiff)\n+\tif ! type \"$merge_tool\" > /dev/null 2>&1; then\n+\t    echo \"The merge tool $merge_tool is not available\"\n+\t    exit 1\n+\tfi\n+\t;;\n+    emerge)\n+\tif ! type \"emacs\" > /dev/null 2>&1; then\n+\t    echo \"Emacs is not available\"\n+\t    exit 1\n+\tfi\n+\t;;\n+    *)\n+\techo \"Unknown merge tool: $merge_tool\"\n+\texit 1\n+\t;;\n+esac\n+\n+if test $# -eq 0 ; then\n+\tfiles=`git ls-files -u | sed -e 's/^[^\t]*\t//' | sort -u`\n+\tif test -z \"$files\" ; then\n+\t\techo \"No files need merging\"\n+\t\texit 0\n+\tfi\n+\techo Merging the files: $files\n+\tgit ls-files -u | sed -e 's/^[^\t]*\t//' | sort -u | while read i\n+\tdo\n+\t\techo \"\"\n+\t\tmerge_file \"$i\" < /dev/tty > /dev/tty\n+\tdone\n+else\n+\twhile test $# -gt 0; do\n+\t\techo \"\"\n+\t\tmerge_file \"$1\"\n+\t\tshift\n+\tdone\n+fi\n+exit 0\n-- \n1.5.0.3.272.gb515-dirty\n"},{"id":"37052","messageId":"20070314055923.GA20978@spearce.org","threadId":"7241","inReplyTo":"E1HRI5K-0008T9-9e@candygram.thunk.org","subject":"Re: [GIT PULL] Please pull mergetool.git","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-03-14T05:59:23Z","receivedAt":"2007-03-14T05:59:23Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Theodore Ts'o <tytso@mit.edu> wrote:\n> +    base_mode=`git ls-files -u -- \"$path\" | awk '{if ($3==1) print $1;}'`\n> +    local_mode=`git ls-files -u -- \"$path\" | awk '{if ($3==2) print $1;}'`\n> +    remote_mode=`git ls-files -u -- \"$path\" | awk '{if ($3==3) print $1;}'`\n> +\n> +    base_present   && git cat-file blob \":1:$path\" > \"$BASE\" 2>/dev/null\n> +    local_present  && git cat-file blob \":2:$path\" > \"$LOCAL\" 2>/dev/null\n> +    remote_present && git cat-file blob \":3:$path\" > \"$REMOTE\" 2>/dev/null\n\nWhy not use `git checkout-index --stage=all \"$path\"` ?\nE.g.:\n\n\tgit checkout-index --stage=all \"$path\" |\n\tread base_temp local_temp remote_temp path\n\nI'm not trying to nitpick, I'm just curious about why this particular\nfeature of checkout-index was not useful here.\n\n-- \nShawn.\n"},{"id":"37056","messageId":"20070314061744.GA12710@thunk.org","threadId":"7241","inReplyTo":"20070314055923.GA20978@spearce.org","subject":"Re: [GIT PULL] Please pull mergetool.git","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-03-14T06:17:44Z","receivedAt":"2007-03-14T06:17:44Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Wed, Mar 14, 2007 at 01:59:23AM -0400, Shawn O. Pearce wrote:\n> Theodore Ts'o <tytso@mit.edu> wrote:\n> > +    base_mode=`git ls-files -u -- \"$path\" | awk '{if ($3==1) print $1;}'`\n> > +    local_mode=`git ls-files -u -- \"$path\" | awk '{if ($3==2) print $1;}'`\n> > +    remote_mode=`git ls-files -u -- \"$path\" | awk '{if ($3==3) print $1;}'`\n> > +\n> > +    base_present   && git cat-file blob \":1:$path\" > \"$BASE\" 2>/dev/null\n> > +    local_present  && git cat-file blob \":2:$path\" > \"$LOCAL\" 2>/dev/null\n> > +    remote_present && git cat-file blob \":3:$path\" > \"$REMOTE\" 2>/dev/null\n> \n> Why not use `git checkout-index --stage=all \"$path\"` ?\n> E.g.:\n> \n> \tgit checkout-index --stage=all \"$path\" |\n> \tread base_temp local_temp remote_temp path\n> \n> I'm not trying to nitpick, I'm just curious about why this particular\n> feature of checkout-index was not useful here.\n\n1)  I didn't know about it.\n\n2) If I used it would I have to have renamed the files to\n<path>.LOCAL, <path>.BASE, et.al, because with most of the graphical\nmerge tools, the filename is the only thing which gets displayed to\ntell the user which file came from the local branch or the remote\nbranch or the base revision --- since file names such as\n.merge_file_QBaxrn and .merge_file_prSEqs don't have a lot of human\nmeaning.....\n\nSo I don't know that it would havce saved much in the script.  You\nreplace three invocations to git-cat-file with one invocation to\ngit-checkout-index plus three invocations to mv.\n\nRegards,\n\n\t\t\t\t\t\t- Ted\n\n\n\t\t\t\n"},{"id":"37057","messageId":"7v4poogvcd.fsf@assigned-by-dhcp.cox.net","threadId":"7241","inReplyTo":"20070314055923.GA20978@spearce.org","subject":"Re: [GIT PULL] Please pull mergetool.git","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-14T07:03:46Z","receivedAt":"2007-03-14T07:03:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> Why not use `git checkout-index --stage=all \"$path\"` ?\n> E.g.:\n>\n> \tgit checkout-index --stage=all \"$path\" |\n> \tread base_temp local_temp remote_temp path\n\n$ echo a b c d | read a b c d; echo \"<$a> <$b> <$c> <$d>\"\n<> <> <> <>\n"},{"id":"37072","messageId":"7vtzwob1lo.fsf@assigned-by-dhcp.cox.net","threadId":"7241","inReplyTo":"E1HRI5K-0008T9-9e@candygram.thunk.org","subject":"Re: [GIT PULL] Please pull mergetool.git","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-14T09:45:07Z","receivedAt":"2007-03-14T09:45:07Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Theodore Ts'o\" <tytso@mit.edu> writes:\n\n> In order to make this easier for me to send future features and\n> cleanups, I've set up a repository on repo.or.cz.  So please pull from:\n>\n> \tgit://repo.or.cz/git/mergetool.git\n>\n> The final patch that is the repository is attached.\n\nThanks, pulled.\n\nThere should be a checklist for adding a new user-level command.\n\nI've been reluctant to write this up, partly because some people\nseem to be disturbed by seeing too many git-blah commands in\ntheir distro's /usr/bin/ and I've been avoiding introducing new\ncommands (I even rejected \"git-diff2\", which I liked what it\ndid), but that is a lame excuse.\n\nSo here it is.\n\n - An .gitignore entry to ignore the build product.\n\n - An Makefile entry to build and clean.\n\n   - For scripts, add git-foo.sh to SCRIPT_SH (or\n     git-foo.perl to SCRIPT_PERL).\n\n   - For a new built-in 'git-foo' that is produced from\n     builtin-foo.c, add builtin-foo.o to BUILTIN_OBJS.\n\n   - For a new standalone 'git-foo' whose main is in foo.c, add\n     git-foo$X to PROGRAMS.\n\n   - (these are not limited to a new program) If you are adding\n     a library object 'foo.o', add it to LIB_OBJS; add new\n     headers to to LIB_H.  For the latter, sorry but our\n     dependencies are a bit too eager to recompile.\n\n - Asciidoc manual in Documentation/git-foo.txt to be formatted\n   to both HTML and man.\n\n - An entry in Documentation/cmd-list.perl (the list at the end\n   of the script).  This is used to link the command from the\n   main documentation git(7) and git.html.\n\nThe last one you missed but that is not a big deal.  I'll add an\nextra commit to add one entry to classify this as an ancillary\nmanipulator.\n"},{"id":"37074","messageId":"81b0412b0703140255j1d49cf0cpea69d381ec8a0a4c@mail.gmail.com","threadId":"7241","inReplyTo":"7vtzwob1lo.fsf@assigned-by-dhcp.cox.net","subject":"Re: [GIT PULL] Please pull mergetool.git","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-03-14T09:55:37Z","receivedAt":"2007-03-14T09:55:37Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 3/14/07, Junio C Hamano <junkio@cox.net> wrote:\n> So here it is.\n>\n>  - An .gitignore entry to ignore the build product.\n>\n>  - An Makefile entry to build and clean.\n>\n\n- If the \"product\" has own Makefile: QUIET support (aka \"V=x\")\n"}]}