{"action":"created","comment":{"url":"https://api.github.com/repos/Originate/git-town/pulls/comments/40956961","id":40956961,"diff_hunk":"@@ -14,6 +14,7 @@ function command_steps {\n   echo_if_all_true \"change_directory $(git_root)\" \"$RUN_IN_GIT_ROOT\" \"$IN_SUB_FOLDER\"\n   echo_if_all_true \"stash_open_changes\" \"$STASH_OPEN_CHANGES\" \"$INITIAL_OPEN_CHANGES\"\n   steps\n+  echo_if_all_true \"set_previous_branch \\$(expected_previous_branch)\"","path":"src/helpers/script_helpers.sh","position":4,"original_position":4,"commit_id":"c9126e04e30bdd9f80d77dd54d5b47bbdde737a1","original_commit_id":"c9126e04e30bdd9f80d77dd54d5b47bbdde737a1","user":{"login":"charlierudolph","id":1676758,"avatar_url":"https://avatars.githubusercontent.com/u/1676758?v=3","gravatar_id":"","url":"https://api.github.com/users/charlierudolph","html_url":"https://github.com/charlierudolph","followers_url":"https://api.github.com/users/charlierudolph/followers","following_url":"https://api.github.com/users/charlierudolph/following{/other_user}","gists_url":"https://api.github.com/users/charlierudolph/gists{/gist_id}","starred_url":"https://api.github.com/users/charlierudolph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlierudolph/subscriptions","organizations_url":"https://api.github.com/users/charlierudolph/orgs","repos_url":"https://api.github.com/users/charlierudolph/repos","events_url":"https://api.github.com/users/charlierudolph/events{/privacy}","received_events_url":"https://api.github.com/users/charlierudolph/received_events","type":"User","site_admin":false},"body":"If the expected previous branch isn't computed until after the rest of the steps are run then it definitely won't work for abort/continue. What about if this was\r\n```\r\nset_previous_branch $INITIAL_BRANCH_NAME $PREVIOUS_BRANCH_NAME\r\n```\r\nThat way we don't defer execution of a function but just move that logic to set_previous_branch (or a different function if you want to keep the current flow.\r\n","created_at":"2015-10-01T19:40:12Z","updated_at":"2015-10-01T19:40:12Z","html_url":"https://github.com/Originate/git-town/pull/668#discussion_r40956961","pull_request_url":"https://api.github.com/repos/Originate/git-town/pulls/668","_links":{"self":{"href":"https://api.github.com/repos/Originate/git-town/pulls/comments/40956961"},"html":{"href":"https://github.com/Originate/git-town/pull/668#discussion_r40956961"},"pull_request":{"href":"https://api.github.com/repos/Originate/git-town/pulls/668"}}},"pull_request":{"url":"https://api.github.com/repos/Originate/git-town/pulls/668","id":46247295,"html_url":"https://github.com/Originate/git-town/pull/668","diff_url":"https://github.com/Originate/git-town/pull/668.diff","patch_url":"https://github.com/Originate/git-town/pull/668.patch","issue_url":"https://api.github.com/repos/Originate/git-town/issues/668","number":668,"state":"open","locked":false,"title":"Preserve checkout history","user":{"login":"allewun","id":1256911,"avatar_url":"https://avatars.githubusercontent.com/u/1256911?v=3","gravatar_id":"","url":"https://api.github.com/users/allewun","html_url":"https://github.com/allewun","followers_url":"https://api.github.com/users/allewun/followers","following_url":"https://api.github.com/users/allewun/following{/other_user}","gists_url":"https://api.github.com/users/allewun/gists{/gist_id}","starred_url":"https://api.github.com/users/allewun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allewun/subscriptions","organizations_url":"https://api.github.com/users/allewun/orgs","repos_url":"https://api.github.com/users/allewun/repos","events_url":"https://api.github.com/users/allewun/events{/privacy}","received_events_url":"https://api.github.com/users/allewun/received_events","type":"User","site_admin":false},"body":"@kevgo @charlierudolph \r\n\r\nRe-tackled #65. I was actually able to migrate most of the work from #501 and integrate it with the new architecture fairly easily.","created_at":"2015-09-29T08:08:51Z","updated_at":"2015-10-01T19:40:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffbaa6ffb83e8177ce3296a8c7e7527c38f2cda0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Originate/git-town/pulls/668/commits","review_comments_url":"https://api.github.com/repos/Originate/git-town/pulls/668/comments","review_comment_url":"https://api.github.com/repos/Originate/git-town/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Originate/git-town/issues/668/comments","statuses_url":"https://api.github.com/repos/Originate/git-town/statuses/c9126e04e30bdd9f80d77dd54d5b47bbdde737a1","head":{"label":"Originate:aw-preserve-checkout-history","ref":"aw-preserve-checkout-history","sha":"c9126e04e30bdd9f80d77dd54d5b47bbdde737a1","user":{"login":"Originate","id":1627168,"avatar_url":"https://avatars.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"repo":{"id":19825320,"name":"git-town","full_name":"Originate/git-town","owner":{"login":"Originate","id":1627168,"avatar_url":"https://avatars.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Originate/git-town","description":"Generic, high-level Git workflow support! ","fork":false,"url":"https://api.github.com/repos/Originate/git-town","forks_url":"https://api.github.com/repos/Originate/git-town/forks","keys_url":"https://api.github.com/repos/Originate/git-town/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Originate/git-town/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Originate/git-town/teams","hooks_url":"https://api.github.com/repos/Originate/git-town/hooks","issue_events_url":"https://api.github.com/repos/Originate/git-town/issues/events{/number}","events_url":"https://api.github.com/repos/Originate/git-town/events","assignees_url":"https://api.github.com/repos/Originate/git-town/assignees{/user}","branches_url":"https://api.github.com/repos/Originate/git-town/branches{/branch}","tags_url":"https://api.github.com/repos/Originate/git-town/tags","blobs_url":"https://api.github.com/repos/Originate/git-town/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Originate/git-town/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Originate/git-town/git/refs{/sha}","trees_url":"https://api.github.com/repos/Originate/git-town/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Originate/git-town/statuses/{sha}","languages_url":"https://api.github.com/repos/Originate/git-town/languages","stargazers_url":"https://api.github.com/repos/Originate/git-town/stargazers","contributors_url":"https://api.github.com/repos/Originate/git-town/contributors","subscribers_url":"https://api.github.com/repos/Originate/git-town/subscribers","subscription_url":"https://api.github.com/repos/Originate/git-town/subscription","commits_url":"https://api.github.com/repos/Originate/git-town/commits{/sha}","git_commits_url":"https://api.github.com/repos/Originate/git-town/git/commits{/sha}","comments_url":"https://api.github.com/repos/Originate/git-town/comments{/number}","issue_comment_url":"https://api.github.com/repos/Originate/git-town/issues/comments{/number}","contents_url":"https://api.github.com/repos/Originate/git-town/contents/{+path}","compare_url":"https://api.github.com/repos/Originate/git-town/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Originate/git-town/merges","archive_url":"https://api.github.com/repos/Originate/git-town/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Originate/git-town/downloads","issues_url":"https://api.github.com/repos/Originate/git-town/issues{/number}","pulls_url":"https://api.github.com/repos/Originate/git-town/pulls{/number}","milestones_url":"https://api.github.com/repos/Originate/git-town/milestones{/number}","notifications_url":"https://api.github.com/repos/Originate/git-town/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Originate/git-town/labels{/name}","releases_url":"https://api.github.com/repos/Originate/git-town/releases{/id}","created_at":"2014-05-15T15:44:29Z","updated_at":"2015-10-01T09:26:50Z","pushed_at":"2015-10-01T19:06:19Z","git_url":"git://github.com/Originate/git-town.git","ssh_url":"git@github.com:Originate/git-town.git","clone_url":"https://github.com/Originate/git-town.git","svn_url":"https://github.com/Originate/git-town","homepage":"http://www.git-town.com","size":13196,"stargazers_count":108,"watchers_count":108,"language":"Cucumber","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":57,"forks":7,"open_issues":57,"watchers":108,"default_branch":"master"}},"base":{"label":"Originate:master","ref":"master","sha":"2b77a8e3639e2a9a591337d44d8dc8131294252e","user":{"login":"Originate","id":1627168,"avatar_url":"https://avatars.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"repo":{"id":19825320,"name":"git-town","full_name":"Originate/git-town","owner":{"login":"Originate","id":1627168,"avatar_url":"https://avatars.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Originate/git-town","description":"Generic, high-level Git workflow support! ","fork":false,"url":"https://api.github.com/repos/Originate/git-town","forks_url":"https://api.github.com/repos/Originate/git-town/forks","keys_url":"https://api.github.com/repos/Originate/git-town/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Originate/git-town/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Originate/git-town/teams","hooks_url":"https://api.github.com/repos/Originate/git-town/hooks","issue_events_url":"https://api.github.com/repos/Originate/git-town/issues/events{/number}","events_url":"https://api.github.com/repos/Originate/git-town/events","assignees_url":"https://api.github.com/repos/Originate/git-town/assignees{/user}","branches_url":"https://api.github.com/repos/Originate/git-town/branches{/branch}","tags_url":"https://api.github.com/repos/Originate/git-town/tags","blobs_url":"https://api.github.com/repos/Originate/git-town/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Originate/git-town/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Originate/git-town/git/refs{/sha}","trees_url":"https://api.github.com/repos/Originate/git-town/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Originate/git-town/statuses/{sha}","languages_url":"https://api.github.com/repos/Originate/git-town/languages","stargazers_url":"https://api.github.com/repos/Originate/git-town/stargazers","contributors_url":"https://api.github.com/repos/Originate/git-town/contributors","subscribers_url":"https://api.github.com/repos/Originate/git-town/subscribers","subscription_url":"https://api.github.com/repos/Originate/git-town/subscription","commits_url":"https://api.github.com/repos/Originate/git-town/commits{/sha}","git_commits_url":"https://api.github.com/repos/Originate/git-town/git/commits{/sha}","comments_url":"https://api.github.com/repos/Originate/git-town/comments{/number}","issue_comment_url":"https://api.github.com/repos/Originate/git-town/issues/comments{/number}","contents_url":"https://api.github.com/repos/Originate/git-town/contents/{+path}","compare_url":"https://api.github.com/repos/Originate/git-town/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Originate/git-town/merges","archive_url":"https://api.github.com/repos/Originate/git-town/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Originate/git-town/downloads","issues_url":"https://api.github.com/repos/Originate/git-town/issues{/number}","pulls_url":"https://api.github.com/repos/Originate/git-town/pulls{/number}","milestones_url":"https://api.github.com/repos/Originate/git-town/milestones{/number}","notifications_url":"https://api.github.com/repos/Originate/git-town/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Originate/git-town/labels{/name}","releases_url":"https://api.github.com/repos/Originate/git-town/releases{/id}","created_at":"2014-05-15T15:44:29Z","updated_at":"2015-10-01T09:26:50Z","pushed_at":"2015-10-01T19:06:19Z","git_url":"git://github.com/Originate/git-town.git","ssh_url":"git@github.com:Originate/git-town.git","clone_url":"https://github.com/Originate/git-town.git","svn_url":"https://github.com/Originate/git-town","homepage":"http://www.git-town.com","size":13196,"stargazers_count":108,"watchers_count":108,"language":"Cucumber","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":57,"forks":7,"open_issues":57,"watchers":108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Originate/git-town/pulls/668"},"html":{"href":"https://github.com/Originate/git-town/pull/668"},"issue":{"href":"https://api.github.com/repos/Originate/git-town/issues/668"},"comments":{"href":"https://api.github.com/repos/Originate/git-town/issues/668/comments"},"review_comments":{"href":"https://api.github.com/repos/Originate/git-town/pulls/668/comments"},"review_comment":{"href":"https://api.github.com/repos/Originate/git-town/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Originate/git-town/pulls/668/commits"},"statuses":{"href":"https://api.github.com/repos/Originate/git-town/statuses/c9126e04e30bdd9f80d77dd54d5b47bbdde737a1"}}}}