Re: [PATCH/RFC] gitweb: Great subroutines renaming
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Aug 8, 2006, 09:48 UTC
- Message-ID
- <eb9mlg$68v$1@sea.gmane.org>
- In-Reply-To
- <eb8cdh$s6n$1@sea.gmane.org>
Jakub Narebski wrote:
Show 5 quoted lines
> With two scripts attached to the first post in this thread it would be > simple to apply pre-rename patch, by converting gitweb to pre-rename using > gitweb-unrename.sh script, then applying patch, then restoring new names > using gitweb-rename.sh script, and finally comitting changes (or amending > commit).
Or just apply corrected gitweb-rename.sh script (see below) to patch (mbox), and then apply and commit the "after rename" patch.
#!/bin/sh
if test -z "$1"; then
FILE=`git rev-parse --show-cdup`gitweb/gitweb.perl
else
FILE=$1
fiecho "Great subroutine renaming: $FILE"
perl -s -p -i.re~ \
-e 's/\bgit_get_referencing\b/format_mark_referencing/;' \
-e 's/\bgit_read_head\b/git_get_head/;' \
-e 's/\bread_info_ref\b/git_read_info_refs/;' \
-e 's/\bdate_str\b/parse_date/;' \
-e 's/\bgit_read_tag\b/parse_tag/;' \
-e 's/\bgit_read_commit\b/parse_commit/;' \
-e 's/\bgit_blob_plain_mimetype\b/blob_plain_mimetype/;' \
-e 's/\bgit_page_nav\b/git_print_page_nav/;' \
-e 's/\bgit_header_div\b/git_print_header_div/;' \
"$FILE"# end of gitweb-rename.sh
-- Jakub Narebski Warsaw, Poland ShadeHawk on #git