* [PATCH v2 1/2] rebase -i: remove get_author_ident_from_commit() from "git-sh-setup.sh"
@ 2009-06-21 5:08 Christian Couder
0 siblings, 0 replies; only message in thread
From: Christian Couder @ 2009-06-21 5:08 UTC (permalink / raw)
To: Junio C Hamano
Cc: git, Johannes Schindelin, Stephan Beyer, Daniel Barkalow,
Jakub Narebski
The "get_author_ident_from_commit" function is only used in
"git-rebase--interactive.sh" so there is no need for this function
to be in "git-sh-setup.sh" anymore.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
git-rebase--interactive.sh | 27 +++++++++++++++++++++++++++
git-sh-setup.sh | 27 ---------------------------
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index f96d887..92e2523 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -116,6 +116,33 @@ mark_action_done () {
fi
}
+get_author_ident_from_commit () {
+ pick_author_script='
+ /^author /{
+ s/'\''/'\''\\'\'\''/g
+ h
+ s/^author \([^<]*\) <[^>]*> .*$/\1/
+ s/'\''/'\''\'\'\''/g
+ s/.*/GIT_AUTHOR_NAME='\''&'\''/p
+
+ g
+ s/^author [^<]* <\([^>]*\)> .*$/\1/
+ s/'\''/'\''\'\'\''/g
+ s/.*/GIT_AUTHOR_EMAIL='\''&'\''/p
+
+ g
+ s/^author [^<]* <[^>]*> \(.*\)$/\1/
+ s/'\''/'\''\'\'\''/g
+ s/.*/GIT_AUTHOR_DATE='\''&'\''/p
+
+ q
+ }
+ '
+ encoding=$(git config i18n.commitencoding || echo UTF-8)
+ git show -s --pretty=raw --encoding="$encoding" "$1" -- |
+ LANG=C LC_ALL=C sed -ne "$pick_author_script"
+}
+
make_patch () {
sha1_and_parents="$(git rev-list --parents -1 "$1")"
case "$sha1_and_parents" in
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 80acb7d..b4624c5 100755
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -131,33 +131,6 @@ require_work_tree () {
die "fatal: $0 cannot be used without a working tree."
}
-get_author_ident_from_commit () {
- pick_author_script='
- /^author /{
- s/'\''/'\''\\'\'\''/g
- h
- s/^author \([^<]*\) <[^>]*> .*$/\1/
- s/'\''/'\''\'\'\''/g
- s/.*/GIT_AUTHOR_NAME='\''&'\''/p
-
- g
- s/^author [^<]* <\([^>]*\)> .*$/\1/
- s/'\''/'\''\'\'\''/g
- s/.*/GIT_AUTHOR_EMAIL='\''&'\''/p
-
- g
- s/^author [^<]* <[^>]*> \(.*\)$/\1/
- s/'\''/'\''\'\'\''/g
- s/.*/GIT_AUTHOR_DATE='\''&'\''/p
-
- q
- }
- '
- encoding=$(git config i18n.commitencoding || echo UTF-8)
- git show -s --pretty=raw --encoding="$encoding" "$1" -- |
- LANG=C LC_ALL=C sed -ne "$pick_author_script"
-}
-
# Make sure we are in a valid repository of a vintage we understand,
# if we require to be in a git repository.
if test -z "$NONGIT_OK"
--
1.6.3.GIT
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-21 5:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-21 5:08 [PATCH v2 1/2] rebase -i: remove get_author_ident_from_commit() from "git-sh-setup.sh" Christian Couder
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).