From 019c949d3904c34f8cce02ca5a27fbebed477af7 Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Sat, 20 Aug 2022 08:09:53 -0600 Subject: [PATCH 1/3] Create CONTRIBUTING first take on this --- CONTRIBUTING | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 CONTRIBUTING diff --git a/CONTRIBUTING b/CONTRIBUTING new file mode 100644 index 00000000..921e5183 --- /dev/null +++ b/CONTRIBUTING @@ -0,0 +1,15 @@ +## Welcome to the Learn Git Branching contributing guide! + +We have a pretty relaxed environment in this project so there's no formal template to submit Pull Requests for. Contributions generally fall into two buckets: + +### Translations + +I welcome all translation improvements or additions! The levels are stored in giant JSON blobs, keyed by locale for each string. This means its somewhat awkward to add new translations, since you have to edit the JSON manually. + +### Bug Fixes, New Features, etc + +These are great too! If you are adding new functionality to the git engine, I would try to add some tests in the `__tests__` folder. It's pretty simple, you can just input a bunch of git commands and show the expected tree state afterwards. + +For bug fixes or CSS/style layout issues, simply attach screenshots of the before and after. For more obscure browsers, targeted CSS rules by browser is a bit more preferred. + +Thanks for stopping by! From 3df64530d9a88b63c2b03875c68198958f24d61d Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Sat, 20 Aug 2022 08:11:01 -0600 Subject: [PATCH 2/3] Rename CONTRIBUTING to CONTRIBUTING.md --- CONTRIBUTING => CONTRIBUTING.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename CONTRIBUTING => CONTRIBUTING.md (100%) diff --git a/CONTRIBUTING b/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING rename to CONTRIBUTING.md From ad04b2d8d8db2ae2bb6997ba343bfdd7d5d4cea7 Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Mon, 29 Aug 2022 16:25:51 -0600 Subject: [PATCH 3/3] Resolves #1004 -- fix arg parsing on git pull --- __tests__/remote.spec.js | 7 +++++++ src/js/git/commands.js | 3 +++ 2 files changed, 10 insertions(+) diff --git a/__tests__/remote.spec.js b/__tests__/remote.spec.js index 92ab9610..167ea5cb 100644 --- a/__tests__/remote.spec.js +++ b/__tests__/remote.spec.js @@ -37,6 +37,13 @@ describe('Git Remotes', function() { ); }); + it('pulls with rebase and arguments', function() { + return expectTreeAsync( + 'git checkout -b foo; git clone; git fakeTeamwork foo; git commit; git pull --rebase origin foo', + '%7B%22branches%22%3A%7B%22main%22%3A%7B%22target%22%3A%22C1%22%2C%22id%22%3A%22main%22%2C%22remoteTrackingBranchID%22%3A%22o/main%22%7D%2C%22foo%22%3A%7B%22target%22%3A%22C3%27%22%2C%22id%22%3A%22foo%22%2C%22remoteTrackingBranchID%22%3A%22o/foo%22%7D%2C%22o/main%22%3A%7B%22target%22%3A%22C1%22%2C%22id%22%3A%22o/main%22%2C%22remoteTrackingBranchID%22%3Anull%7D%2C%22o/foo%22%3A%7B%22target%22%3A%22C2%22%2C%22id%22%3A%22o/foo%22%2C%22remoteTrackingBranchID%22%3Anull%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C3%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C3%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%2C%22C3%27%22%3A%7B%22parents%22%3A%5B%22C2%22%5D%2C%22id%22%3A%22C3%27%22%7D%7D%2C%22tags%22%3A%7B%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22foo%22%2C%22id%22%3A%22HEAD%22%7D%2C%22originTree%22%3A%7B%22branches%22%3A%7B%22main%22%3A%7B%22target%22%3A%22C1%22%2C%22id%22%3A%22main%22%2C%22remoteTrackingBranchID%22%3Anull%7D%2C%22foo%22%3A%7B%22target%22%3A%22C2%22%2C%22id%22%3A%22foo%22%2C%22remoteTrackingBranchID%22%3Anull%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%7D%2C%22tags%22%3A%7B%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22foo%22%2C%22id%22%3A%22HEAD%22%7D%7D%7D', + ); + }); + it('pushes', function() { return expectTreeAsync( 'git clone; git commit; git push', diff --git a/src/js/git/commands.js b/src/js/git/commands.js index e08122dd..50406209 100644 --- a/src/js/git/commands.js +++ b/src/js/git/commands.js @@ -230,6 +230,9 @@ var commandConfig = { var commandOptions = command.getOptionsMap(); var generalArgs = command.getGeneralArgs(); + if (commandOptions['--rebase']) { + generalArgs = commandOptions['--rebase'].concat(generalArgs); + } command.twoArgsForOrigin(generalArgs); assertOriginSpecified(generalArgs); // here is the deal -- git pull is pretty complex with