Commit a9f9f8c
remote.c: introduce branch_get_upstream helper
All of the information needed to find the @{upstream} of a
branch is included in the branch struct, but callers have to
navigate a series of possible-NULL values to get there.
Let's wrap that logic up in an easy-to-read helper.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 8770e6f commit a9f9f8c
5 files changed
Lines changed: 23 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 129 | + | |
132 | 130 | | |
133 | | - | |
| 131 | + | |
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
668 | | - | |
| 667 | + | |
| 668 | + | |
669 | 669 | | |
670 | | - | |
671 | 670 | | |
672 | 671 | | |
673 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1632 | 1632 | | |
1633 | 1633 | | |
1634 | 1634 | | |
1635 | | - | |
1636 | | - | |
1637 | | - | |
| 1635 | + | |
| 1636 | + | |
1638 | 1637 | | |
1639 | 1638 | | |
1640 | 1639 | | |
1641 | 1640 | | |
1642 | 1641 | | |
1643 | | - | |
1644 | | - | |
1645 | 1642 | | |
1646 | 1643 | | |
1647 | 1644 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1705 | 1705 | | |
1706 | 1706 | | |
1707 | 1707 | | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
1708 | 1715 | | |
1709 | 1716 | | |
1710 | 1717 | | |
| |||
1914 | 1921 | | |
1915 | 1922 | | |
1916 | 1923 | | |
1917 | | - | |
1918 | | - | |
| 1924 | + | |
| 1925 | + | |
1919 | 1926 | | |
1920 | 1927 | | |
1921 | 1928 | | |
1922 | | - | |
1923 | 1929 | | |
1924 | 1930 | | |
1925 | 1931 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
221 | 228 | | |
222 | 229 | | |
223 | 230 | | |
| |||
0 commit comments