@@ -860,22 +860,22 @@ static int is_linear_history(struct commit *from, struct commit *to)
860
860
861
861
static int can_fast_forward (struct commit * onto , struct commit * upstream ,
862
862
struct commit * restrict_revision ,
863
- struct commit * head , struct object_id * merge_base )
863
+ struct commit * head , struct object_id * branch_base )
864
864
{
865
865
struct commit_list * merge_bases = NULL ;
866
866
int res = 0 ;
867
867
868
868
merge_bases = get_merge_bases (onto , head );
869
869
if (!merge_bases || merge_bases -> next ) {
870
- oidcpy (merge_base , null_oid ());
870
+ oidcpy (branch_base , null_oid ());
871
871
goto done ;
872
872
}
873
873
874
- oidcpy (merge_base , & merge_bases -> item -> object .oid );
875
- if (!oideq (merge_base , & onto -> object .oid ))
874
+ oidcpy (branch_base , & merge_bases -> item -> object .oid );
875
+ if (!oideq (branch_base , & onto -> object .oid ))
876
876
goto done ;
877
877
878
- if (restrict_revision && !oideq (& restrict_revision -> object .oid , merge_base ))
878
+ if (restrict_revision && !oideq (& restrict_revision -> object .oid , branch_base ))
879
879
goto done ;
880
880
881
881
if (!upstream )
@@ -1029,7 +1029,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1029
1029
struct strbuf msg = STRBUF_INIT ;
1030
1030
struct strbuf revisions = STRBUF_INIT ;
1031
1031
struct strbuf buf = STRBUF_INIT ;
1032
- struct object_id merge_base ;
1032
+ struct object_id branch_base ;
1033
1033
int ignore_whitespace = 0 ;
1034
1034
enum action action = ACTION_NONE ;
1035
1035
const char * gpg_sign = NULL ;
@@ -1644,15 +1644,15 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1644
1644
} else if (!options .onto_name )
1645
1645
options .onto_name = options .upstream_name ;
1646
1646
if (strstr (options .onto_name , "..." )) {
1647
- if (get_oid_mb (options .onto_name , & merge_base ) < 0 ) {
1647
+ if (get_oid_mb (options .onto_name , & branch_base ) < 0 ) {
1648
1648
if (keep_base )
1649
1649
die (_ ("'%s': need exactly one merge base with branch" ),
1650
1650
options .upstream_name );
1651
1651
else
1652
1652
die (_ ("'%s': need exactly one merge base" ),
1653
1653
options .onto_name );
1654
1654
}
1655
- options .onto = lookup_commit_or_die (& merge_base ,
1655
+ options .onto = lookup_commit_or_die (& branch_base ,
1656
1656
options .onto_name );
1657
1657
} else {
1658
1658
options .onto =
@@ -1690,11 +1690,11 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1690
1690
* in which case we could fast-forward without replacing the commits
1691
1691
* with new commits recreated by replaying their changes.
1692
1692
*
1693
- * Note that can_fast_forward() initializes merge_base , so we have to
1693
+ * Note that can_fast_forward() initializes branch_base , so we have to
1694
1694
* call it before checking allow_preemptive_ff.
1695
1695
*/
1696
1696
if (can_fast_forward (options .onto , options .upstream , options .restrict_revision ,
1697
- options .orig_head , & merge_base ) &&
1697
+ options .orig_head , & branch_base ) &&
1698
1698
allow_preemptive_ff ) {
1699
1699
int flag ;
1700
1700
@@ -1736,12 +1736,12 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1736
1736
struct diff_options opts ;
1737
1737
1738
1738
if (options .flags & REBASE_VERBOSE ) {
1739
- if (is_null_oid (& merge_base ))
1739
+ if (is_null_oid (& branch_base ))
1740
1740
printf (_ ("Changes to %s:\n" ),
1741
1741
oid_to_hex (& options .onto -> object .oid ));
1742
1742
else
1743
1743
printf (_ ("Changes from %s to %s:\n" ),
1744
- oid_to_hex (& merge_base ),
1744
+ oid_to_hex (& branch_base ),
1745
1745
oid_to_hex (& options .onto -> object .oid ));
1746
1746
}
1747
1747
@@ -1753,8 +1753,8 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1753
1753
DIFF_FORMAT_SUMMARY | DIFF_FORMAT_DIFFSTAT ;
1754
1754
opts .detect_rename = DIFF_DETECT_RENAME ;
1755
1755
diff_setup_done (& opts );
1756
- diff_tree_oid (is_null_oid (& merge_base ) ?
1757
- the_hash_algo -> empty_tree : & merge_base ,
1756
+ diff_tree_oid (is_null_oid (& branch_base ) ?
1757
+ the_hash_algo -> empty_tree : & branch_base ,
1758
1758
& options .onto -> object .oid , "" , & opts );
1759
1759
diffcore_std (& opts );
1760
1760
diff_flush (& opts );
@@ -1785,7 +1785,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1785
1785
* we just fast-forwarded.
1786
1786
*/
1787
1787
strbuf_reset (& msg );
1788
- if (oideq (& merge_base , & options .orig_head -> object .oid )) {
1788
+ if (oideq (& branch_base , & options .orig_head -> object .oid )) {
1789
1789
printf (_ ("Fast-forwarded %s to %s.\n" ),
1790
1790
branch_name , options .onto_name );
1791
1791
strbuf_addf (& msg , "rebase finished: %s onto %s" ,
0 commit comments