-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rebase: extract am code to new source file
Extract the code for am-based rebase to git-rebase--am.sh. Suggested-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Loading branch information
Martin von Zweigbergk
authored and
Junio C Hamano
committed
Feb 10, 2011
1 parent
fa99c1e
commit 46df82d
Showing
4 changed files
with
38 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2010 Junio C Hamano. | ||
# | ||
|
||
. git-sh-setup | ||
|
||
case "$action" in | ||
continue) | ||
git am --resolved --3way --resolvemsg="$resolvemsg" && | ||
move_to_original_branch | ||
exit | ||
;; | ||
skip) | ||
git am --skip -3 --resolvemsg="$resolvemsg" && | ||
move_to_original_branch | ||
exit | ||
;; | ||
esac | ||
|
||
test -n "$rebase_root" && root_flag=--root | ||
|
||
git format-patch -k --stdout --full-index --ignore-if-in-upstream \ | ||
--src-prefix=a/ --dst-prefix=b/ \ | ||
--no-renames $root_flag "$revisions" | | ||
git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" && | ||
move_to_original_branch | ||
ret=$? | ||
test 0 != $ret -a -d "$state_dir" && | ||
echo $head_name > "$state_dir/head-name" && | ||
echo $onto > "$state_dir/onto" && | ||
echo $orig_head > "$state_dir/orig-head" && | ||
echo "$GIT_QUIET" > "$state_dir/quiet" | ||
exit $ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters