Skip to content

Commit

Permalink
Backport PR #6653
Browse files Browse the repository at this point in the history
---------

**Commit 1:**
[internal] Replace empty var declaration with let

Any time there is a variable defined in a JS file without also storing a
value in it, we know that definition cannot be converted to a const, so
we convert it to a let.

For example:

`var blah;` becomes `let blah;`

Some of these things variables might be unused, and many others can
likely be switched to const with only minor refactoring, but the commit
is very large, so there are no changes in it other than the 1:1 switch.

* Original sha: bfc59e9
* Authored by Court Ewing <court@epixa.com> on 2016-03-24T22:27:29Z
  • Loading branch information
elastic-jasper authored and epixa committed Mar 28, 2016
1 parent 2be8934 commit b87fbc2
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
28 changes: 28 additions & 0 deletions backport.rej.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
### Backport of PR [#6653](https://github.com/elastic/kibana/pull/6653) to branch 4.x failed


**65** files could not be found in this branch,

**177** patches failed to apply,
while **30** patches were applied successfully.

-------------------------------------

The following script will rebase the commits that need to be backported onto
this backport branch. Resolve any conflicts as you normally would in a rebase.
You do *not* need to remove these backport.rej files, and you can add
additional commits if that's necessary.

```
sh begin-backport.rej
```

Once the conficts are resolved on your local backport branch, the following
script will remove the remnants of this backport commit and squash the newly
resolved commits (and any others you may have added) into a single backport
commit with the proper commit message. Finally, it'll replace the upstream
backport branch (the one from the backport PR) with the result.

```
sh finish-backport.rej
```
13 changes: 13 additions & 0 deletions begin-backport.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

REMOTE="upstream"
BRANCH="jasper/backport/6653/4.x"
STARTING_SHA="bfc59e9666d1cb593e6fe94b09322af5c6e3db07"
ENDING_SHA="bfc59e9666d1cb593e6fe94b09322af5c6e3db07"

WORKING_BRANCH="tmp/$BRANCH"

git fetch $REMOTE

git checkout -b $WORKING_BRANCH $ENDING_SHA
git rebase $STARTING_SHA^ --onto $BRANCH
20 changes: 20 additions & 0 deletions commit-message-backport.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Backport PR #6653
---------

**Commit 1:**
[internal] Replace empty var declaration with let

Any time there is a variable defined in a JS file without also storing a
value in it, we know that definition cannot be converted to a const, so
we convert it to a let.

For example:

`var blah;` becomes `let blah;`

Some of these things variables might be unused, and many others can
likely be switched to const with only minor refactoring, but the commit
is very large, so there are no changes in it other than the 1:1 switch.

* Original sha: bfc59e9666d1cb593e6fe94b09322af5c6e3db07
* Authored by Court Ewing <court@epixa.com> on 2016-03-24T22:27:29Z
20 changes: 20 additions & 0 deletions finish-backport.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

REMOTE="upstream"
BRANCH="jasper/backport/6653/4.x"

COMMIT_MSG=`cat commit-message-backport.rej`

WORKING_BRANCH="tmp/$BRANCH"

git checkout $BRANCH
git reset --hard $WORKING_BRANCH
git branch -D $WORKING_BRANCH

git reset --soft $REMOTE/$BRANCH
git stash
git reset --hard HEAD^
git stash apply --index

git commit -m "$COMMIT_MSG" --no-verify
git push -f $REMOTE $BRANCH

0 comments on commit b87fbc2

Please sign in to comment.