Merge branch 'js/rebase'
authorJunio C Hamano <gitster@pobox.com>
Mon, 2 Jul 2007 08:45:47 +0000 (01:45 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Jul 2007 08:45:47 +0000 (01:45 -0700)
* js/rebase:
Teach rebase -i about --preserve-merges
rebase -i: provide reasonable reflog for the rebased branch
rebase -i: several cleanups
ignore git-rebase--interactive
Teach rebase an interactive mode
Move the pick_author code to git-sh-setup

1  2 
Makefile
git-sh-setup.sh
diff --combined Makefile
index 5d60dc8e1247bdea39016dd409159f1ca1b15982,4ea5e450bd2b749fd4e8469febcab519de3ea48c..eed6bd57703e5634642769cad755511b549b8cc7
+++ b/Makefile
@@@ -94,9 -94,9 +94,9 @@@ all:
  # Define OLD_ICONV if your library has an old iconv(), where the second
  # (input buffer pointer) parameter is declared with type (const char **).
  #
 -# Define NO_R_TO_GCC if your gcc does not like "-R/path/lib" that
 -# tells runtime paths to dynamic libraries; "-Wl,-rpath=/path/lib"
 -# is used instead.
 +# Define NO_R_TO_GCC_LINKER if your gcc does not like "-R/path/lib"
 +# that tells runtime paths to dynamic libraries;
 +# "-Wl,-rpath=/path/lib" is used instead.
  #
  # Define USE_NSEC below if you want git to care about sub-second file mtimes
  # and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and
@@@ -204,7 -204,7 +204,7 @@@ SCRIPT_SH = 
        git-fetch.sh \
        git-ls-remote.sh \
        git-merge-one-file.sh git-mergetool.sh git-parse-remote.sh \
-       git-pull.sh git-rebase.sh \
+       git-pull.sh git-rebase.sh git-rebase--interactive.sh \
        git-repack.sh git-request-pull.sh git-reset.sh \
        git-sh-setup.sh \
        git-tag.sh git-verify-tag.sh \
diff --combined git-sh-setup.sh
index 0de49e8459a0d00264de442e6e89db846496541d,d861db3b2807c1c23141f5e7d346a694104b6a21..98959600ebf5ccc3693d1b3048ebcd59696b64d0
@@@ -29,7 -29,11 +29,7 @@@ set_reflog_action() 
  }
  
  is_bare_repository () {
 -      git-config --bool --get core.bare ||
 -      case "$GIT_DIR" in
 -      .git | */.git) echo false ;;
 -      *) echo true ;;
 -      esac
 +      git-rev-parse --is-bare-repository
  }
  
  cd_to_toplevel () {
  }
  
  require_work_tree () {
 -      test $(is_bare_repository) = false &&
 +      test $(git-rev-parse --is-inside-work-tree) = true &&
        test $(git-rev-parse --is-inside-git-dir) = false ||
        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"
+ }
  if [ -z "$LONG_USAGE" ]
  then
        LONG_USAGE="Usage: $0 $USAGE"