{"thread":{"id":"19883","subject":"[PATCH v2 1/2] rebase -i: remove get_author_ident_from_commit() from \"git-sh-setup.sh\"","startedAt":"2009-06-21T05:08:44Z","lastAt":"2009-06-21T05:08:44Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"116691","messageId":"20090621050846.3554.57922.chriscool@tuxfamily.org","threadId":"19883","inReplyTo":null,"subject":"[PATCH v2 1/2] rebase -i: remove get_author_ident_from_commit() from \"git-sh-setup.sh\"","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-06-21T05:08:44Z","receivedAt":"2009-06-21T05:08:44Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"The \"get_author_ident_from_commit\" function is only used in\n\"git-rebase--interactive.sh\" so there is no need for this function\nto be in \"git-sh-setup.sh\" anymore.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n git-rebase--interactive.sh |   27 +++++++++++++++++++++++++++\n git-sh-setup.sh            |   27 ---------------------------\n 2 files changed, 27 insertions(+), 27 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex f96d887..92e2523 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -116,6 +116,33 @@ mark_action_done () {\n \tfi\n }\n \n+get_author_ident_from_commit () {\n+\tpick_author_script='\n+\t/^author /{\n+\t\ts/'\\''/'\\''\\\\'\\'\\''/g\n+\t\th\n+\t\ts/^author \\([^<]*\\) <[^>]*> .*$/\\1/\n+\t\ts/'\\''/'\\''\\'\\'\\''/g\n+\t\ts/.*/GIT_AUTHOR_NAME='\\''&'\\''/p\n+\n+\t\tg\n+\t\ts/^author [^<]* <\\([^>]*\\)> .*$/\\1/\n+\t\ts/'\\''/'\\''\\'\\'\\''/g\n+\t\ts/.*/GIT_AUTHOR_EMAIL='\\''&'\\''/p\n+\n+\t\tg\n+\t\ts/^author [^<]* <[^>]*> \\(.*\\)$/\\1/\n+\t\ts/'\\''/'\\''\\'\\'\\''/g\n+\t\ts/.*/GIT_AUTHOR_DATE='\\''&'\\''/p\n+\n+\t\tq\n+\t}\n+\t'\n+\tencoding=$(git config i18n.commitencoding || echo UTF-8)\n+\tgit show -s --pretty=raw --encoding=\"$encoding\" \"$1\" -- |\n+\tLANG=C LC_ALL=C sed -ne \"$pick_author_script\"\n+}\n+\n make_patch () {\n \tsha1_and_parents=\"$(git rev-list --parents -1 \"$1\")\"\n \tcase \"$sha1_and_parents\" in\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex 80acb7d..b4624c5 100755\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -131,33 +131,6 @@ require_work_tree () {\n \tdie \"fatal: $0 cannot be used without a working tree.\"\n }\n \n-get_author_ident_from_commit () {\n-\tpick_author_script='\n-\t/^author /{\n-\t\ts/'\\''/'\\''\\\\'\\'\\''/g\n-\t\th\n-\t\ts/^author \\([^<]*\\) <[^>]*> .*$/\\1/\n-\t\ts/'\\''/'\\''\\'\\'\\''/g\n-\t\ts/.*/GIT_AUTHOR_NAME='\\''&'\\''/p\n-\n-\t\tg\n-\t\ts/^author [^<]* <\\([^>]*\\)> .*$/\\1/\n-\t\ts/'\\''/'\\''\\'\\'\\''/g\n-\t\ts/.*/GIT_AUTHOR_EMAIL='\\''&'\\''/p\n-\n-\t\tg\n-\t\ts/^author [^<]* <[^>]*> \\(.*\\)$/\\1/\n-\t\ts/'\\''/'\\''\\'\\'\\''/g\n-\t\ts/.*/GIT_AUTHOR_DATE='\\''&'\\''/p\n-\n-\t\tq\n-\t}\n-\t'\n-\tencoding=$(git config i18n.commitencoding || echo UTF-8)\n-\tgit show -s --pretty=raw --encoding=\"$encoding\" \"$1\" -- |\n-\tLANG=C LC_ALL=C sed -ne \"$pick_author_script\"\n-}\n-\n # Make sure we are in a valid repository of a vintage we understand,\n # if we require to be in a git repository.\n if test -z \"$NONGIT_OK\"\n-- \n1.6.3.GIT\n"}]}