git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
blob 3d2b89e1c144eb7c9a473ae105154cb05644c0ba 1738 bytes (raw)
name: git-rebase--interactive.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 
#!/bin/sh
# This shell script fragment is sourced by git-rebase to implement
# its interactive mode.  "git rebase --interactive" makes it easy
# to fix up commits in the middle of a series and rearrange commits.
#
# Copyright (c) 2006 Johannes E. Schindelin
#
# The original idea comes from Eric W. Biederman, in
# https://public-inbox.org/git/m1odwkyuf5.fsf_-_@ebiederm.dsl.xmission.com/

. git-rebase--interactive--lib

# The whole contents of this file is run by dot-sourcing it from
# inside a shell function.  It used to be that "return"s we see
# below were not inside any function, and expected to return
# to the function that dot-sourced us.
#
# However, older (9.x) versions of FreeBSD /bin/sh misbehave on such a
# construct and continue to run the statements that follow such a "return".
# As a work-around, we introduce an extra layer of a function
# here, and immediately call it after defining it.
git_rebase__interactive () {

	initiate_action "$action"
	ret=$?
	if test $ret = 0; then
		return 0
	fi

	setup_reflog_action
	init_basic_state

	merges_option="--no-merges --cherry-pick"

	shorthead=$(git rev-parse --short $orig_head)
	shortonto=$(git rev-parse --short $onto)
	if test -z "$rebase_root"
		# this is now equivalent to ! -z "$upstream"
	then
		shortupstream=$(git rev-parse --short $upstream)
		revisions=$upstream...$orig_head
		shortrevisions=$shortupstream..$shorthead
	else
		revisions=$onto...$orig_head
		shortrevisions=$shorthead
	fi

	git rebase--helper --make-script ${keep_empty:+--keep-empty} \
		$revisions ${restrict_revision+^$restrict_revision} >"$todo" ||
	    die "$(gettext "Could not generate todo list")"

	complete_action
}
# ... and then we call the whole thing.
git_rebase__interactive

debug log:

solving 3d2b89e1c ...
found 3d2b89e1c in https://public-inbox.org/git/20180320204507.12623-4-wink@saville.com/
found 331c8dfea in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100644 331c8dfeac3cac2fd2d9d9287d5c487669fe80a0	git-rebase--interactive.sh

applying [1/1] https://public-inbox.org/git/20180320204507.12623-4-wink@saville.com/
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 331c8dfea..3d2b89e1c 100644

Checking patch git-rebase--interactive.sh...
Applied patch git-rebase--interactive.sh cleanly.

index at:
100644 3d2b89e1c144eb7c9a473ae105154cb05644c0ba	git-rebase--interactive.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).