From e913ff47bd2bc05983424172f1b0bc49ad258478 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Thu, 18 Feb 2016 09:36:34 +0100 Subject: [PATCH 1/7] add Git Beginner, Git remote whitelist/blacklist, Git Travis CI improvements project --- SoC-2016-Microprojects.md | 101 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/SoC-2016-Microprojects.md b/SoC-2016-Microprojects.md index 8953ca7de9..f20671532e 100644 --- a/SoC-2016-Microprojects.md +++ b/SoC-2016-Microprojects.md @@ -173,3 +173,104 @@ It should only show the error message instead. Cf. $gmane/284328 These still use a hand-rolled option parser, which can be replaced by using the parse-options api. Each of these files can be a microproject of its own. + + +### Git Beginner + +Git is an incredible powerful tool with lots of different commands that +offer a variety of ways to approach source control management. Naturally +every way has advantages and disadvantages which a seasoned user can +carefully consider and out weight against each other. However, many new +users of Git are unable to cope with this variety, at least initially. +If they run into a problem they likely search the Internet and find +a StackOverflow answer instructing them to run a certain Git commands +to solve their problems. A rushed user (aren't we all?) might run these +commands without reading the docs which might makes the problem worse. + +The core of this micro project is to evaluate with a running prototype +if it is possible to implement a "Git Beginner Mode". The mode shall be +activated with the config "core.isbeginner" by Git users who prefer +this safety net (default should be false). + +If this mode is enabled then Git shall refuse to run the following +commands if issued by the users (some commands are used by Git +internally and there they need to run regardless of the +"core.isbeginner" config) + +``` +git rebase +git reset --hard +git clean -f +git gc --prune=now --aggressive +git push -f +``` + +This list can and should be extend by the student. The goal is to +find the minimal necessary subset of Git commands to successfully +perform source control management. Seasoned Git users most likely +disagree with this list as it would restrict them from working +efficiently with Git (e.g. by maintaining a nice history using +`rebase`). However, these users are not the target audience. The target +audience are beginners that want or need to use Git and want to +stay out of trouble. + +### Git remote whitelist/blacklist + +Git beginners are easily confused by the distributed nature of Git. +One source of confusion are Git remotes, especially if there are +multiple ones. This is a potentially big thread to cooperations +as Git beginners might push changes to a public remote such as +github.com instead of the private company Git server. + +This micro project is about to implement a Git remote whitelist +and blacklist using Git config. + +Whitelist example: +``` +[remote] + default = deny + message = "Are you sure you're not pushing company code?" + allowed = http://whitelisted-hosting.org + allowed = http://git-hosting.org/whitelisted-org + allowed = http://git-hosting.org/org/whitelisted-repo +``` + +Blacklist example: +``` +[remote] + default = allow + denied = http://denied-hosting.com +``` + +If a user wants to push changes to a blacklisted remote then the `push` +command would print a generic error. If a `remote.message` is defined +then this message would be shown in addition. + + +### Git Travis CI improvements + +Automated testing is an important safety net for complex software such +as Git. This micro project is about to improve the Git Travis CI +integration. + +Here are a few improvement ideas to get started: + +* install CVS on the build machines to run t94?? and t96?? tests +* install SVN on the build machines to run t91?? tests +* install Apache Web Server to run 5539, 5550, and 5561 +* investigate if it is possible to run t1509 root worktree test +* investigate if it is possible to add jgit to run t5310 +* investigate why GIT_TEST_LONG=YesPlease does not work on TravisCI +* investigate if we can use pylint to analyze the git-p4 Python code +* investigate if we can trigger Coverity static code analysis for the Git master + branch (hint: Stefan Beller already looked into this) - start here: + https://scan.coverity.com/travis_ci +* investigate if we can run Clang static code analysis +* generate Git Travis CI statistics (e.g. how long dues a build run, which + tests fail the most often etc.) - use this as starting point: + https://scribu.github.io/travis-stats/#git/git +* investigate if it makes sense to run t/perf tests + +This list can and should be extend by the student. + + From bf283e4d99c68af6a38903f265d6d5e4d25d1376 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Fri, 19 Feb 2016 09:46:29 +0100 Subject: [PATCH 2/7] fix typo --- SoC-2016-Microprojects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoC-2016-Microprojects.md b/SoC-2016-Microprojects.md index f20671532e..d27e6fb133 100644 --- a/SoC-2016-Microprojects.md +++ b/SoC-2016-Microprojects.md @@ -218,7 +218,7 @@ stay out of trouble. Git beginners are easily confused by the distributed nature of Git. One source of confusion are Git remotes, especially if there are -multiple ones. This is a potentially big thread to cooperations +multiple ones. This is a potentially big threat to cooperations as Git beginners might push changes to a public remote such as github.com instead of the private company Git server. From 5948cd216dbc7fc4c9934e96a203f225005f89e6 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Fri, 19 Feb 2016 10:07:23 +0100 Subject: [PATCH 3/7] * improve beginners mode project idea * move beginners mode and remote white/blacklist to projects * split up CI microprojects --- SoC-2016-Ideas.md | 76 +++++++++++++++++++++++ SoC-2016-Microprojects.md | 126 ++++++++++++-------------------------- 2 files changed, 114 insertions(+), 88 deletions(-) diff --git a/SoC-2016-Ideas.md b/SoC-2016-Ideas.md index dfca9278b8..8215ba0782 100644 --- a/SoC-2016-Ideas.md +++ b/SoC-2016-Ideas.md @@ -189,3 +189,79 @@ performant C code, making it a so-called "built-in". already ported by now. It is still possible to start with something small by porting portions of existing shell-scripts to C using a C helper inside the existing shell-script. + + +### Git Beginner + +Git is an incredible powerful tool with lots of different commands that +offer a variety of ways to approach source control management. Naturally +every way has advantages and disadvantages which a seasoned user can +carefully consider and out weight against each other. However, many new +users of Git are unable to cope with this variety, at least initially. +If they run into a problem they likely search the Internet and find +a StackOverflow answer instructing them to run a certain Git commands +to solve their problems. A rushed user (aren't we all?) might run these +commands without reading the docs which might makes the problem worse. + +The core of this micro project is to evaluate with a running prototype +if it is possible to implement a "Git Beginner Mode". The mode shall be +activated with the config "core.isbeginner" by Git users who prefer +this safety net (default should be false). + +If this mode is enabled then Git shall print a warning message before +running a potentially destructive command. In addition to the warning +Git shall print a command that would reverse the operation if possible. +Most of the information to reverse an operation is already available +via git reflog. However, the task here is to make this information +more easily accessible to Git beginners. + +The following commands should be guarded with this mechanism: + +``` +git rebase +git reset --hard +git clean -f +git gc --prune=now --aggressive +git push -f +``` + +This list can and should be extend by the student. The goal is to +find the minimal necessary subset of Git commands to successfully +perform source control management. Seasoned Git users most likely +disagree with this list as it would restrict them from working +efficiently with Git (e.g. by maintaining a nice history using +`rebase`). However, these users are not the target audience. The target +audience are beginners that want or need to use Git and want to +stay out of trouble. + +### Git remote whitelist/blacklist + +Git beginners are easily confused by the distributed nature of Git. +One source of confusion are Git remotes, especially if there are +multiple ones. This is a potentially big threat to cooperations +as Git beginners might push changes to a public remote such as +github.com instead of the private company Git server. + +This micro project is about to implement a Git remote whitelist +and blacklist using Git config. + +Whitelist example: +``` +[remote] + default = deny + message = "Are you sure you're not pushing company code?" + allowed = http://whitelisted-hosting.org + allowed = http://git-hosting.org/whitelisted-org + allowed = http://git-hosting.org/org/whitelisted-repo +``` + +Blacklist example: +``` +[remote] + default = allow + denied = http://denied-hosting.com +``` + +If a user wants to push changes to a blacklisted remote then the `push` +command would print a generic error. If a `remote.message` is defined +then this message would be shown in addition. diff --git a/SoC-2016-Microprojects.md b/SoC-2016-Microprojects.md index d27e6fb133..5ab73f55b1 100644 --- a/SoC-2016-Microprojects.md +++ b/SoC-2016-Microprojects.md @@ -174,103 +174,53 @@ These still use a hand-rolled option parser, which can be replaced by using the parse-options api. Each of these files can be a microproject of its own. +### Git CI Improvements 1 -### Git Beginner - -Git is an incredible powerful tool with lots of different commands that -offer a variety of ways to approach source control management. Naturally -every way has advantages and disadvantages which a seasoned user can -carefully consider and out weight against each other. However, many new -users of Git are unable to cope with this variety, at least initially. -If they run into a problem they likely search the Internet and find -a StackOverflow answer instructing them to run a certain Git commands -to solve their problems. A rushed user (aren't we all?) might run these -commands without reading the docs which might makes the problem worse. - -The core of this micro project is to evaluate with a running prototype -if it is possible to implement a "Git Beginner Mode". The mode shall be -activated with the config "core.isbeginner" by Git users who prefer -this safety net (default should be false). - -If this mode is enabled then Git shall refuse to run the following -commands if issued by the users (some commands are used by Git -internally and there they need to run regardless of the -"core.isbeginner" config) - -``` -git rebase -git reset --hard -git clean -f -git gc --prune=now --aggressive -git push -f -``` - -This list can and should be extend by the student. The goal is to -find the minimal necessary subset of Git commands to successfully -perform source control management. Seasoned Git users most likely -disagree with this list as it would restrict them from working -efficiently with Git (e.g. by maintaining a nice history using -`rebase`). However, these users are not the target audience. The target -audience are beginners that want or need to use Git and want to -stay out of trouble. - -### Git remote whitelist/blacklist - -Git beginners are easily confused by the distributed nature of Git. -One source of confusion are Git remotes, especially if there are -multiple ones. This is a potentially big threat to cooperations -as Git beginners might push changes to a public remote such as -github.com instead of the private company Git server. - -This micro project is about to implement a Git remote whitelist -and blacklist using Git config. - -Whitelist example: -``` -[remote] - default = deny - message = "Are you sure you're not pushing company code?" - allowed = http://whitelisted-hosting.org - allowed = http://git-hosting.org/whitelisted-org - allowed = http://git-hosting.org/org/whitelisted-repo -``` - -Blacklist example: -``` -[remote] - default = allow - denied = http://denied-hosting.com -``` - -If a user wants to push changes to a blacklisted remote then the `push` -command would print a generic error. If a `remote.message` is defined -then this message would be shown in addition. - - -### Git Travis CI improvements +Automated testing is an important safety net for complex software such +as Git. This micro project is about to improve the Git Travis CI +integration. + +Investigate if we can trigger Coverity static code analysis for the Git +master and maint branch (hint: Stefan Beller already looked into this). +Start here: https://scan.coverity.com/travis_ci + +### Git CI Improvements 2 + +Automated testing is an important safety net for complex software such +as Git. This micro project is about to improve the Git Travis CI +integration. + +Investigate if we can enable and run Clang static code analysis for the +master and maint branch. + +### Git CI Improvements 3 Automated testing is an important safety net for complex software such as Git. This micro project is about to improve the Git Travis CI integration. -Here are a few improvement ideas to get started: +Investigate if we can use pylint to analyze the git-p4 Python code. + +### Git CI Improvements 4 + +Automated testing is an important safety net for complex software such +as Git. This micro project is about to improve the Git Travis CI +integration. * install CVS on the build machines to run t94?? and t96?? tests * install SVN on the build machines to run t91?? tests * install Apache Web Server to run 5539, 5550, and 5561 -* investigate if it is possible to run t1509 root worktree test -* investigate if it is possible to add jgit to run t5310 -* investigate why GIT_TEST_LONG=YesPlease does not work on TravisCI -* investigate if we can use pylint to analyze the git-p4 Python code -* investigate if we can trigger Coverity static code analysis for the Git master - branch (hint: Stefan Beller already looked into this) - start here: - https://scan.coverity.com/travis_ci -* investigate if we can run Clang static code analysis -* generate Git Travis CI statistics (e.g. how long dues a build run, which - tests fail the most often etc.) - use this as starting point: - https://scribu.github.io/travis-stats/#git/git -* investigate if it makes sense to run t/perf tests - -This list can and should be extend by the student. +### Git CI Improvements 5 + +Automated testing is an important safety net for complex software such +as Git. This micro project is about to improve the Git Travis CI +integration. + +Git's test suit is huge and over time we have seen some flaky test. +Build a web page that analyzes the Travis CI test results and prints +the test that fail most often. Use this implementation as starting point: +https://scribu.github.io/travis-stats/#git/git +After you have done this look at the randomly failing tests and try to +figure out why they fail. See [here](https://travis-ci.org/git/git/jobs/108417904) for an example of such a test failure From 19c1da3abc54231cf0a35e494f64055c62aed5c5 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Fri, 19 Feb 2016 10:11:14 +0100 Subject: [PATCH 4/7] remove unnessary part of git beginner --- SoC-2016-Ideas.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/SoC-2016-Ideas.md b/SoC-2016-Ideas.md index 56b68717a0..89cde2479a 100644 --- a/SoC-2016-Ideas.md +++ b/SoC-2016-Ideas.md @@ -227,14 +227,7 @@ git gc --prune=now --aggressive git push -f ``` -This list can and should be extend by the student. The goal is to -find the minimal necessary subset of Git commands to successfully -perform source control management. Seasoned Git users most likely -disagree with this list as it would restrict them from working -efficiently with Git (e.g. by maintaining a nice history using -`rebase`). However, these users are not the target audience. The target -audience are beginners that want or need to use Git and want to -stay out of trouble. +This list can and should be extend by the student. ### Git remote whitelist/blacklist From ace06da87c8de5968c24a618d9f7f91927fcb9f9 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Fri, 19 Feb 2016 10:11:47 +0100 Subject: [PATCH 5/7] fix typo --- SoC-2016-Ideas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoC-2016-Ideas.md b/SoC-2016-Ideas.md index 89cde2479a..651f650159 100644 --- a/SoC-2016-Ideas.md +++ b/SoC-2016-Ideas.md @@ -227,7 +227,7 @@ git gc --prune=now --aggressive git push -f ``` -This list can and should be extend by the student. +This list can and should be extended by the student. ### Git remote whitelist/blacklist From a0178d0124d91f8138a9bf9c1d548d8a4ea16a3a Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Fri, 19 Feb 2016 10:12:30 +0100 Subject: [PATCH 6/7] remove micro project --- SoC-2016-Ideas.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SoC-2016-Ideas.md b/SoC-2016-Ideas.md index 651f650159..6048b65d9b 100644 --- a/SoC-2016-Ideas.md +++ b/SoC-2016-Ideas.md @@ -205,7 +205,7 @@ a StackOverflow answer instructing them to run a certain Git commands to solve their problems. A rushed user (aren't we all?) might run these commands without reading the docs which might makes the problem worse. -The core of this micro project is to evaluate with a running prototype +The core of this project is to evaluate with a running prototype if it is possible to implement a "Git Beginner Mode". The mode shall be activated with the config "core.isbeginner" by Git users who prefer this safety net (default should be false). @@ -237,7 +237,7 @@ multiple ones. This is a potentially big threat to cooperations as Git beginners might push changes to a public remote such as github.com instead of the private company Git server. -This micro project is about to implement a Git remote whitelist +This project is about to implement a Git remote whitelist and blacklist using Git config. Whitelist example: From f3ccb7511345bdaf44dc8485bc90ed79bc77fa19 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Fri, 19 Feb 2016 10:14:41 +0100 Subject: [PATCH 7/7] fix sentence --- SoC-2016-Microprojects.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SoC-2016-Microprojects.md b/SoC-2016-Microprojects.md index a8f6c341a5..b70f0fc53f 100644 --- a/SoC-2016-Microprojects.md +++ b/SoC-2016-Microprojects.md @@ -227,7 +227,8 @@ the test that fail most often. Use this implementation as starting point: https://scribu.github.io/travis-stats/#git/git After you have done this look at the randomly failing tests and try to -figure out why they fail. See [here](https://travis-ci.org/git/git/jobs/108417904) for an example of such a test failure +figure out why they fail. See [here](https://travis-ci.org/git/git/jobs/108417904) +for an example of such a test failure. ### Teach "git pull --rebase" the "--[no-]autostash" option