Skip to content

Commit a798e95

Browse files
committed
lookup-commit.sh: stop pretending that git/git is gitster/git
That script wants to ensure that the remote called `gitster` is registered, but when it is not, it registers it with the URL https://github.com/git/git. That is misleading. All the script wanted from the gitster/git repository was the `seen` branch, anyway, and the git/git repository does have that. So let's just refer to it as `upstream/seen`, as is done elsewhere in GitGitGadget's code base. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 3e9ea02 commit a798e95

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

script/lookup-commit.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ update_gitgit_dir () {
6868
git -C "$GITGIT_DIR" fetch $git_remote refs/notes/commit-to-mail:refs/notes/commit-to-mail ||
6969
die "Could not update refs/notes/commit-to-mail"
7070

71-
if git -C "$GITGIT_DIR" rev-parse --verify refs/remotes/gitster/seen >/dev/null 2>&1
71+
if git -C "$GITGIT_DIR" rev-parse --verify refs/remotes/upstream/seen >/dev/null 2>&1
7272
then
7373
# Let's take 'seen' from the official source at git.git.
74-
git -C "$GITGIT_DIR" remote set-url gitster https://github.com/git/git
75-
git -C "$GITGIT_DIR" fetch gitster ||
76-
die "Could not update the 'gitster' remote to $GITGIT_DIR"
74+
git -C "$GITGIT_DIR" remote set-url upstream https://github.com/git/git
75+
git -C "$GITGIT_DIR" fetch upstream ||
76+
die "Could not update the 'upstream' remote to $GITGIT_DIR"
7777
else
78-
git -C "$GITGIT_DIR" remote add -f gitster https://github.com/git/git ||
79-
die "Could not add the 'gitster' remote to $GITGIT_DIR"
78+
git -C "$GITGIT_DIR" remote add -f upstream https://github.com/git/git ||
79+
die "Could not add the 'upstream' remote to $GITGIT_DIR"
8080
fi
8181
}
8282

@@ -182,8 +182,8 @@ test notes != "$mode" || {
182182
update_gitgit_dir ||
183183
die "Could not update $GITGIT_DIR"
184184

185-
to="$(git -C "$GITGIT_DIR" rev-parse --verify refs/remotes/gitster/seen)" ||
186-
die "Could not determine tip rev of gitster/seen"
185+
to="$(git -C "$GITGIT_DIR" rev-parse --verify refs/remotes/upstream/seen)" ||
186+
die "Could not determine tip rev of upstream/seen"
187187
from="$(git -C "$GITGIT_DIR" show -s --format=%s refs/notes/commit-to-mail^{/Update.from.commit.range} 2>/dev/null | sed -ne 's/"//g' -e 's/^Update from commit range \(.*\.\.\)\?//p')"
188188

189189
# Already the newest? Skip

0 commit comments

Comments
 (0)