From 1221a4386de08586e06917fe163333d3de76662b Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 10 Mar 2014 12:06:59 -0400 Subject: [PATCH] Clarify ticket fetch instructions --- src/main/java/com/gitblit/tickets/commands.md | 4 ++-- src/main/java/com/gitblit/wicket/pages/TicketPage.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gitblit/tickets/commands.md b/src/main/java/com/gitblit/tickets/commands.md index da889865..87fe515c 100644 --- a/src/main/java/com/gitblit/tickets/commands.md +++ b/src/main/java/com/gitblit/tickets/commands.md @@ -2,10 +2,10 @@ To review an updated patchset - git fetch && git checkout ${ticketBranch} && git pull --ff-only + git fetch origin && git checkout ${ticketBranch} && git pull --ff-only To review a rewritten patchset - git fetch && git checkout ${ticketBranch} && git reset --hard origin/${ticketBranch} + git fetch origin && git checkout ${ticketBranch} && git reset --hard origin/${ticketBranch} diff --git a/src/main/java/com/gitblit/wicket/pages/TicketPage.java b/src/main/java/com/gitblit/wicket/pages/TicketPage.java index 569818fe..80b55766 100644 --- a/src/main/java/com/gitblit/wicket/pages/TicketPage.java +++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.java @@ -1203,8 +1203,8 @@ public class TicketPage extends TicketBasePage { }; panel.add(pathsView); - addPtReviewInstructions(user, repository, panel); - addGitReviewInstructions(user, repository, panel); + addPtCheckoutInstructions(user, repository, panel); + addGitCheckoutInstructions(user, repository, panel); panel.add(createMergePanel(user, repository)); return panel; @@ -1278,13 +1278,13 @@ public class TicketPage extends TicketBasePage { return x; } - protected void addGitReviewInstructions(UserModel user, RepositoryModel repository, MarkupContainer panel) { + protected void addGitCheckoutInstructions(UserModel user, RepositoryModel repository, MarkupContainer panel) { panel.add(new Label("gitStep1", MessageFormat.format(getString("gb.stepN"), 1))); panel.add(new Label("gitStep2", MessageFormat.format(getString("gb.stepN"), 2))); String ticketBranch = Repository.shortenRefName(PatchsetCommand.getTicketBranch(ticket.number)); - String step1 = "git fetch"; + String step1 = "git fetch origin"; String step2 = MessageFormat.format("git checkout {0} && git pull --ff-only\nOR\ngit checkout {0} && git reset --hard origin/{0}", ticketBranch); panel.add(new Label("gitPreStep1", step1)); @@ -1294,7 +1294,7 @@ public class TicketPage extends TicketBasePage { panel.add(createCopyFragment("gitCopyStep2", step2.replace("\n", " && "))); } - protected void addPtReviewInstructions(UserModel user, RepositoryModel repository, MarkupContainer panel) { + protected void addPtCheckoutInstructions(UserModel user, RepositoryModel repository, MarkupContainer panel) { String step1 = MessageFormat.format("pt checkout {0,number,0}", ticket.number); panel.add(new Label("ptPreStep", step1)); panel.add(createCopyFragment("ptCopyStep", step1)); -- 2.39.5