Case when I can not unstage the hunk
Hi. Here is log: git reset HEAD -p /home/kes/s/public/v2/js/contact_us.js diff --git a/public/v2/js/contact_us.js b/public/v2/js/contact_us.js index e05be6d0..d429d291 100644 --- a/public/v2/js/contact_us.js +++ b/public/v2/js/contact_us.js @@ -1,7 +1,19 @@ + + +function captchaProcess( form ) { + var id = $(form).find( 'textarea[name=g-recaptcha-response]' ) +.attr( 'id' ).match( /\d+$/ ); + if( id ){ id = id[0] } else { id = 0 } + grecaptcha.reset( Number( id ) ); + grecaptcha.execute( Number( id ) ); + // When .execute is done this will trigger callback + // which is specified on g-recaptcha div element via data-callback attr +} + + // FORM VALIDATION -var validator; $(function(){ - validator = $('#contact_us-form').validate({ + $('#contact_us-form').validate({ rules: { name: { required: true, Unstage this hunk [y,n,q,a,d,j,J,g,/,s,e,?]? s Split into 3 hunks. @@ -1 +1,14 @@ + + +function captchaProcess( form ) { + var id = $(form).find( 'textarea[name=g-recaptcha-response]' ) +.attr( 'id' ).match( /\d+$/ ); + if( id ){ id = id[0] } else { id = 0 } + grecaptcha.reset( Number( id ) ); + grecaptcha.execute( Number( id ) ); + // When .execute is done this will trigger callback + // which is specified on g-recaptcha div element via data-callback attr +} + + // FORM VALIDATION Unstage this hunk [y,n,q,a,d,j,J,g,/,e,?]? n @@ -1,3 +14,2 @@ // FORM VALIDATION -var validator; $(function(){ Unstage this hunk [y,n,q,a,d,K,j,J,g,/,e,?]? y @@ -3,5 +15,5 @@ $(function(){ - validator = $('#contact_us-form').validate({ + $('#contact_us-form').validate({ rules: { name: { required: true, Unstage this hunk [y,n,q,a,d,K,j,J,g,/,e,?]? y @@ -47,12 +59,7 @@ $(function(){ $(element).removeClass("error_inp"); }, submitHandler: function(form) { - var id = $(form).find( 'textarea[name=g-recaptcha-response]' ) -.attr( 'id' ).match( /\d+$/ ); - if( id ){ id = id[0] } else { id = 0 } - grecaptcha.execute( Number( id ) ); - // When .execute is done this will trigger callback - // which is specified on g-recaptcha div element via data-callback attr + captchaProcess( form ); } }); }); Unstage this hunk [y,n,q,a,d,K,g,/,e,?]? n error: patch failed: public/v2/js/contact_us.js:1 error: public/v2/js/contact_us.js: patch does not apply diff --git a/public/v2/js/contact_us.js b/public/v2/js/contact_us.js index e05be6d0..d429d291 100644 --- a/public/v2/js/contact_us.js +++ b/public/v2/js/contact_us.js @@ -1,7 +1,6 @@ // FORM VALIDATION -var validator; $(function(){ - validator = $('#contact_us-form').validate({ + $('#contact_us-form').validate({ rules: { name: { required: true, DETAILS: git diff -b -w --ignore-blank-lines /home/kes/s/public/v2/js/contact_us.js diff --git a/public/v2/js/contact_us.js b/public/v2/js/contact_us.js index d429d291..bd1f4ddd 100644 --- a/public/v2/js/contact_us.js +++ b/public/v2/js/contact_us.js @@ -1,10 +1,24 @@ +function show_validator_errors( xhr, validator ) { + if( xhr.status == 404 ) { return } + + var res = xhr.responseJSON; + // TODO: Display responseText if there is no responseJSON + if( !res ) { return }; + + var errors = {}; + // convert server response into validator format + for( var error in res.error.info ) { +errors[error] = res.error.info[ error ][ 1 ] || 'Error'; + } + validator.showErrors( errors ); +} + function captchaProcess( form ) { var id = $(form).find( 'textarea[name=g-recaptcha-response]' ) .attr( 'id' ).match( /\d+$/ ); if( id ){ id = id[0] } else { id = 0 } - grecaptcha.reset( Number( id ) ); grecaptcha.execute( Number( id ) ); // When .execute is done this will trigger callback // which is specified on g-recaptcha div element via data-callback attr git diff -b -w --ignore-blank-lines --staged /home/kes/s/public/v2/js/contact_us.js diff --git a/public/v2/js/contact_us.js b/public/v2/js/contact_us.js index e05be6d0..d429d291 100644 --- a/public/v2/js/contact_us.js +++ b/public/v2/js/contact_us.js @@ -1,7 +1,19 @@ + + +function captchaProcess( form ) { + var id = $(form).find( 'textarea[name=g-recaptcha-response]' ) +.attr( 'id' ).match( /\d+$/ ); + if( id ){ id = id[0] } else { id = 0 } + grecaptcha.reset( Number( id ) ); + grecaptcha.execute( Number( id ) ); + // When .execute is done this will trigger callback + // which is specified on g-recaptcha div element via data-callback attr +} + + // FORM VALIDATION -var validator; $(function(){ - validator = $('#contact_us-form').validate({ + $('#contact_us-form').validate({ rules: { name: { required: true,
stat displayed differently
Hi. At next log: $ git prb POST git-upload-pack (948 bytes) remote: Counting objects: 20, done. remote: Compressing objects: 100% (19/19), done. remote: Total 20 (delta 14), reused 0 (delta 0) Unpacking objects: 100% (20/20), done. >From https://tracker.feel-safe.net/gitdev/main 9eafff67..cf2226de 296_tos-> origin/296_tos = [up to date]297-unification-of-buttons -> origin/297-unification-of-buttons = [up to date]ToS-component -> origin/ToS-component = [up to date]authorization_pg -> origin/authorization_pg = [up to date]buy_dev-> origin/buy_dev = [up to date]content_negotiation_fixes -> origin/content_negotiation_fixes = [up to date]dash_v2-> origin/dash_v2 = [up to date]design_master -> origin/design_master = [up to date]design_master_2-> origin/design_master_2 = [up to date]fix_order_pg -> origin/fix_order_pg = [up to date]master -> origin/master = [up to date]new_design_master -> origin/new_design_master = [up to date]new_error_pg -> origin/new_error_pg = [up to date]text-page-style-> origin/text-page-style Created autostash: 43c2c613 HEAD is now at 9eafff67 Create validator variable Changes from 9eafff67776fd53ff61bb58bdd4f5cdd166ef476 to cf2226deb3b130348504ae393bede9e371fcb5d1: design/dash/decomp/templates/modals/modal_success.html | 2 +- lib/Mojolicious/Plugin/Control/Modal.pm| 118 ++--- public/main/css/modal.css | 28 + templates/main/index.html.ep | 4 ++ 4 files changed, 92 insertions(+), 60 deletions(-) create mode 100644 public/main/css/modal.css Note: checking out 'cf2226deb3b130348504ae393bede9e371fcb5d1'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b HEAD is now at cf2226de Fix modal window for reset password Rebasing (1/1) .../decomp/templates/modals/modal_success.html | 2 +- lib/Mojolicious/Plugin/Control/Modal.pm| 118 ++--- public/main/css/modal.css | 28 + templates/main/index.html.ep | 4 + 4 files changed, 92 insertions(+), 60 deletions(-) Successfully rebased and updated refs/heads/296_tos. Applied autostash. We have two output of stat. But it is displayed differently How to force stat output be consistent between outputs? lib/Mojolicious/Plugin/Control/Modal.pm| 118 ++--- VS lib/Mojolicious/Plugin/Control/Modal.pm| 118 ++---
Re: Work is not replayed on top while: git pull -v --rebase
The commits are lost always if both users did `git push --force` How to reproduce: 1. First user: `git push --force` 2. Second user: `git push --force` 3. First user: `git pull -v --rebase` Here after 3 I expect that git will say that after rebase some commits from current branch will not be exists after rebasing some logs: kes@work ~/s $ git tree * 704f068f (HEAD -> 296_tos, back) Fix message * 8d9aef32 Merge branch 'fix_login_form' into 296_tos |\ | * f1c6616a Copy value over all contact |/ * 528b8f0d Merge branch 'fix_profile' into 296_tos $ git pull -v --rebase >From https://tracker.feel-safe.net/gitdev/main = [up to date]296_tos-> origin/296_tos = [up to date]297-unification-of-buttons -> origin/297-unification-of-buttons = [up to date]ToS-component -> origin/ToS-component = [up to date]authorization_pg -> origin/authorization_pg = [up to date]buy_dev-> origin/buy_dev = [up to date]content_negotiation_fixes -> origin/content_negotiation_fixes = [up to date]dash_v2-> origin/dash_v2 = [up to date]design_master -> origin/design_master = [up to date]design_master_2-> origin/design_master_2 = [up to date]fix_order_pg -> origin/fix_order_pg = [up to date]master -> origin/master = [up to date]new_design_master -> origin/new_design_master = [up to date]new_error_pg -> origin/new_error_pg = [up to date]text-page-style-> origin/text-page-style Changes from f66c29158a57d687aaf48fb89f9b897563c0142e to e8875a0aa09cd1f352a41a5c164b5b2fdcdbe75b: public/profile/profile.html | 2 +- public/v2/css/ask_options.css | 17 -- public/v2/css/authorization.css | 20 +-- public/v2/css/input.css | 8 +-- public/v2/css/layout.css| 18 --- public/v2/css/media.css | 150 +++- public/v2/css/menu.css | 4 +- public/v2/css/profile.css | 5 ++ public/v2/css/tos.css | 38 - templates/v2/profile.html.ep| 44 ++- templates/v2/tariff/ask_options.html.ep | 2 +- templates/v2/tos/tos.html.ep| 4 +- 12 files changed, 195 insertions(+), 117 deletions(-) Note: checking out 'e8875a0aa09cd1f352a41a5c164b5b2fdcdbe75b'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b HEAD is now at e8875a0a Fix media queries for Profile Page Rebasing (1/1) 704f068fc32b05e043d3ae7a2c06a853bcbaca85 [detached HEAD f85f0623] Fix message Date: Tue Sep 25 09:37:34 2018 +0300 1 file changed, 1 insertion(+), 1 deletion(-) cpanfile| 4 - cpanfile.snapshot | 57 + lib/App.pm | 2 +- lib/App/Controller/User.pm | 43 +--- lib/DbMapper.pm | 210 - lib/DbMapper/Adapter.pm | 12 - lib/DbMapper/Adapter/DBI.pm | 90 --- lib/DbMapper/Adapter/DBI/Schema.pm | 66 -- lib/DbMapper/Adapter/Echo.pm| 17 -- lib/DbMapper/Adapter/Echo/Schema.pm | 49 lib/DbMapper/Data.pm| 179 -- lib/DbMapper/DataSet.pm | 459 lib/DbMapper/Schema.pm | 23 -- lib/Mojolicious/Plugin/Auth.pm | 1 - public/v2/css/authorization.css | 11 +- public/v2/css/media.css | 95 ++-- public/v2/css/menu.css | 4 +- public/v2/js/authorization.js | 4 - t/DbMapper/create_data.t| 22 -- t/DbMapper/field_access.t | 58 - t/DbMapper/iterate.t| 55 - t/DbMapper/join.t | 223 -- t/DbMapper/lib/DSt/Role.pm | 7 - t/DbMapper/lib/DSt/User.pm | 31 --- t/DbMapper/lib/DSt/X1.pm| 24 -- t/DbMapper/lib/DSt/X2.pm| 8 - t/DbMapper/update_data.t| 15 -- templates/v2/profile.html.ep| 70 -- 28 files changed, 153 insertions(+), 1686 deletions(-) Successfully rebased and updated refs/heads/296_tos. kes@work ~/s $ git tree * f85f0623 (HEAD -> 296_tos) Fix message * e8875a0a (origin/296_tos) Fix media queries for Profile Page * 46a1c00b Fix media queries for screen less than 780px * a562406d Bulk changes * 177e2515 Bulk changes
Re: Work is not replayed on top while: git pull -v --rebase
As you can see I have lost some commits. Thus I wanna an option to be safe 20.09.2018, 17:38, "Junio C Hamano" : > KES writes: > >> PS. for `git push --force` there is alternative: --force-with-lease >> Is there something similar to --force-with-lease but for `git pull -v >> --rebase`? > > Curious. > > For "push", you are competing with the other pushers who want to > update the repository over there, and there is need for the > force-with-lease= safety, but what is the > reason why you need to take a lease on your local side while doing > a "pull"?
Work is not replayed on top while: git pull -v --rebase
Hi. TL;DR; Some local commits are lost while `git pull -v --rebase` [alias] tree= log --graph --decorate --pretty=oneline --abbrev-commit changes = log --graph --decorate --pretty=oneline --abbrev-commit --cherry-pick --boundary --left-right $ git fetch origin remote: Counting objects: 806, done. remote: Compressing objects: 100% (197/197), done. remote: Total 806 (delta 587), reused 806 (delta 587) Receiving objects: 100% (806/806), 85.96 KiB | 0 bytes/s, done. Resolving deltas: 100% (587/587), completed with 19 local objects. >From https://tracker.feel-safe.net/gitdev/main + a562406d...f9015227 296_tos-> origin/296_tos (forced update) Here we see that someone did 'forced update' $ git tree -n 5 * a562406d (HEAD -> 296_tos, back) Bulk changes ### <<< PUT ATTENTION HERE * 177e2515 Bulk changes * 934bbb31 Fix Profile Page * 811d8812 Fix button's width on Authorization form * 97ca9419 Fix Tariff Options page Here git know that a562406d already pushed to remote Now I want to update my branch $ git pull -v --rebase >From https://tracker.feel-safe.net/gitdev/main = [up to date]296_tos-> origin/296_tos = [up to date]text-page-style-> origin/text-page-style Changes from f66c29158a57d687aaf48fb89f9b897563c0142e to f9015227da20ad1f858174b4b4c188338eb26640: cpanfile| 4 + templates/v2/tos/tos.html.ep| 4 +- 31 files changed, 1694 insertions(+), 106 deletions(-) create mode 100644 lib/DbMapper.pm create mode 100644 t/DbMapper/update_data.t First, rewinding head to replay your work on top of it... $ git tree -n 5 * f9015227 (HEAD -> 296_tos, origin/296_tos) Bulk changes * 95064421 Fix Profile Page * c03c930a Fix button's width on Authorization form * e6df0662 Fix Tariff Options page * 22b5c754 Fix header on order page $ diff <(git show f901522) <(git show 177e2515) 1c1 < commit f9015227da20ad1f858174b4b4c188338eb26640 --- > commit 177e2515eb2bc1c9733b4374f2da373aa969a601 $ git changes a562406d...f9015227 > 50e9343a Merge branch 'orm' into dash_v2 |\ | > 4be5e3c6 Test data fetching from DataSet | > 11d60181 More tests: Manual condition OP for join expression | < a562406d (back) Bulk changes o f66c2915 (origin/dash_v2, dash_v2) Merge branch 'move_example_elements' into dash_v2 We can see that a562406d after rebasing **is lost** Why a562406d is not applied on top of remote branch? PS. for `git push --force` there is alternative: --force-with-lease Is there something similar to --force-with-lease but for `git pull -v --rebase`?
Re: After rebasing and reset I am on unexpected commit
ah, sorry. I understand why. The merge was on remote side. 21.06.2018, 12:37, "KES" : > Hi. > > I am on my current branch: > > $ git log --graph --decorate --pretty=oneline --abbrev-commit > * 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS > * f45a919 Create SCTT for Contractor > * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement > * 7e4cac9 Create SCTT for Language > * a0607d1 Fixed broken tests for 'Person' > * 1d0a1b2 Create SCTT for DocumentFile > * 92837c1 Fix SQL quoting problem > > Now I want to pull new changes and rebase my work on top of it: > > $ git pull -v -r amazon SCTT_for_other_tables > From amazon:/v1/repos/tucha > * branch SCTT_for_other_tables -> FETCH_HEAD > = [up to date] SCTT_for_other_tables -> amazon/SCTT_for_other_tables > Created autostash: 97ce867 > HEAD is now at 5b85d64 Implement script to test CORS > Changes from 5b85d647ecd503cc03b26ed4e33bf8266bc8e96b to > a0d92dc11ec11023f6d492497e043170d7128f56: > lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 +--- > public/maitre_d/api-v1.yaml | 158 > ++- > t/MaitreD/contractor_type_i18n.t | 117 +++ > 3 files changed, 276 insertions(+), 53 deletions(-) > create mode 100644 t/MaitreD/contractor_type_i18n.t > Note: checking out 'a0d92dc11ec11023f6d492497e043170d7128f56'. > > You are in 'detached HEAD' state. You can look around, make experimental > changes and commit them, and you can discard any commits you make in this > state without impacting any branches by performing another checkout. > > If you want to create a new branch to retain commits you create, you may > do so (now or later) by using -b with the checkout command again. Example: > > git checkout -b > > HEAD is now at a0d92dc Merge branch 'SCTT_for_other_tables' of > amazon:/v1/repos/tucha into SCTT_for_other_tables > Rebasing (1/1) > lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 + > public/maitre_d/api-v1.yaml | 158 ++- > t/MaitreD/contractor_type_i18n.t | 117 > 3 files changed, 276 insertions(+), 53 deletions(-) > Successfully rebased and updated refs/heads/SCTT_for_other_tables. > Applying autostash resulted in conflicts. > Your changes are safe in the stash. > You can run "git stash pop" or "git stash drop" at any time. > > As you can see the rebase finished successfully except applying autostash > > $ git log --graph --decorate --pretty=oneline --abbrev-commit > * a0d92dc (HEAD -> SCTT_for_other_tables, amazon/SCTT_for_other_tables) Merge > branch 'SCTT_for_oth > |\ > | * 5b85d64 Implement script to test CORS > * | 0c1ac6c Create SCTT for ContractorTypeI18n > |/ > * f45a919 Create SCTT for Contractor > * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement > * 7e4cac9 Create SCTT for Language > * a0607d1 Fixed broken tests for 'Person' > * 1d0a1b2 Create SCTT for DocumentFile > * 92837c1 Fix SQL quoting problem > > 1. Why I got merge? I did not ask that. Thus I want to rewind back > > $ git reset --hard HEAD^ > HEAD is now at 0c1ac6c Create SCTT for ContractorTypeI18n > > 2. Why I am returned to 0c1ac6c Create SCTT for ContractorTypeI18n > instead of: 5b85d64 Implement script to test CORS ? > > I expect to be in the state when I start my rebasing > > $ git log --graph --decorate --pretty=oneline --abbrev-commit > * 0c1ac6c (HEAD -> SCTT_for_other_tables) Create SCTT for ContractorTypeI18n > * f45a919 Create SCTT for Contractor > * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement > * 7e4cac9 Create SCTT for Language > * a0607d1 Fixed broken tests for 'Person' > * 1d0a1b2 Create SCTT for DocumentFile > * 92837c1 Fix SQL quoting problem > > Now 5b85d64 Implement script to test CORS is not any branch and with less > attention will be lost > > What did I do wrong? is this behavior expected?
After rebasing and reset I am on unexpected commit
Hi. I am on my current branch: $ git log --graph --decorate --pretty=oneline --abbrev-commit * 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS * f45a919 Create SCTT for Contractor * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement * 7e4cac9 Create SCTT for Language * a0607d1 Fixed broken tests for 'Person' * 1d0a1b2 Create SCTT for DocumentFile * 92837c1 Fix SQL quoting problem Now I want to pull new changes and rebase my work on top of it: $ git pull -v -r amazon SCTT_for_other_tables >From amazon:/v1/repos/tucha * branchSCTT_for_other_tables -> FETCH_HEAD = [up to date] SCTT_for_other_tables -> amazon/SCTT_for_other_tables Created autostash: 97ce867 HEAD is now at 5b85d64 Implement script to test CORS Changes from 5b85d647ecd503cc03b26ed4e33bf8266bc8e96b to a0d92dc11ec11023f6d492497e043170d7128f56: lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 +--- public/maitre_d/api-v1.yaml | 158 ++- t/MaitreD/contractor_type_i18n.t | 117 +++ 3 files changed, 276 insertions(+), 53 deletions(-) create mode 100644 t/MaitreD/contractor_type_i18n.t Note: checking out 'a0d92dc11ec11023f6d492497e043170d7128f56'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b HEAD is now at a0d92dc Merge branch 'SCTT_for_other_tables' of amazon:/v1/repos/tucha into SCTT_for_other_tables Rebasing (1/1) lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 + public/maitre_d/api-v1.yaml | 158 ++- t/MaitreD/contractor_type_i18n.t | 117 3 files changed, 276 insertions(+), 53 deletions(-) Successfully rebased and updated refs/heads/SCTT_for_other_tables. Applying autostash resulted in conflicts. Your changes are safe in the stash. You can run "git stash pop" or "git stash drop" at any time. As you can see the rebase finished successfully except applying autostash $ git log --graph --decorate --pretty=oneline --abbrev-commit * a0d92dc (HEAD -> SCTT_for_other_tables, amazon/SCTT_for_other_tables) Merge branch 'SCTT_for_oth |\ | * 5b85d64 Implement script to test CORS * | 0c1ac6c Create SCTT for ContractorTypeI18n |/ * f45a919 Create SCTT for Contractor * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement * 7e4cac9 Create SCTT for Language * a0607d1 Fixed broken tests for 'Person' * 1d0a1b2 Create SCTT for DocumentFile * 92837c1 Fix SQL quoting problem 1. Why I got merge? I did not ask that. Thus I want to rewind back $ git reset --hard HEAD^ HEAD is now at 0c1ac6c Create SCTT for ContractorTypeI18n 2. Why I am returned to 0c1ac6c Create SCTT for ContractorTypeI18n instead of: 5b85d64 Implement script to test CORS ? I expect to be in the state when I start my rebasing $ git log --graph --decorate --pretty=oneline --abbrev-commit * 0c1ac6c (HEAD -> SCTT_for_other_tables) Create SCTT for ContractorTypeI18n * f45a919 Create SCTT for Contractor * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement * 7e4cac9 Create SCTT for Language * a0607d1 Fixed broken tests for 'Person' * 1d0a1b2 Create SCTT for DocumentFile * 92837c1 Fix SQL quoting problem Now 5b85d64 Implement script to test CORS is not any branch and with less attention will be lost What did I do wrong? is this behavior expected?
After merging and reset I am on unexpected commit
Hi. I am on my current branch. $ git log --graph --decorate --pretty=oneline --abbrev-commit * 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS * f45a919 Create SCTT for Contractor * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement * 7e4cac9 Create SCTT for Language * a0607d1 Fixed broken tests for 'Person' * 1d0a1b2 Create SCTT for DocumentFile * 92837c1 Fix SQL quoting problem I want to pull new changes and apply mine on top of them I do `git pull -v -r` kes@work ~/t $ git pull -v -r amazon SCTT_for_other_tables >From amazon:/v1/repos/tucha * branchSCTT_for_other_tables -> FETCH_HEAD = [up to date] SCTT_for_other_tables -> amazon/SCTT_for_other_tables Created autostash: 97ce867 HEAD is now at 5b85d64 Implement script to test CORS Changes from 5b85d647ecd503cc03b26ed4e33bf8266bc8e96b to a0d92dc11ec11023f6d492497e043170d7128f56: lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 +--- public/maitre_d/api-v1.yaml | 158 ++- t/MaitreD/contractor_type_i18n.t | 117 +++ 3 files changed, 276 insertions(+), 53 deletions(-) create mode 100644 t/MaitreD/contractor_type_i18n.t Note: checking out 'a0d92dc11ec11023f6d492497e043170d7128f56'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b HEAD is now at a0d92dc Merge branch 'SCTT_for_other_tables' of amazon:/v1/repos/tucha into SCTT_for_other_tables Rebasing (1/1) lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 + public/maitre_d/api-v1.yaml | 158 ++- t/MaitreD/contractor_type_i18n.t | 117 3 files changed, 276 insertions(+), 53 deletions(-) Successfully rebased and updated refs/heads/SCTT_for_other_tables. Applying autostash resulted in conflicts. Your changes are safe in the stash. You can run "git stash pop" or "git stash drop" at any time. As you can see the rebasing is finished successfully except autostash is not applied $ git log --graph --decorate --pretty=oneline --abbrev-commit * a0d92dc (HEAD -> SCTT_for_other_tables, amazon/SCTT_for_other_tables) Merge branch 'SCTT_for_oth |\ | * 5b85d64 Implement script to test CORS * | 0c1ac6c Create SCTT for ContractorTypeI18n |/ * f45a919 Create SCTT for Contractor * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement * 7e4cac9 Create SCTT for Language * a0607d1 Fixed broken tests for 'Person' 1. Why I get merge when I ask to rebase? Because of merge I wanna to roll back that. Thus I reset my merge commit kes@work ~/t $ git reset --hard HEAD^ HEAD is now at 0c1ac6c Create SCTT for ContractorTypeI18n 2. Why I moved to 0c1ac6c Create SCTT for ContractorTypeI18n commit instead of 5b85d64 Implement script to test CORS? $ git log --graph --decorate --pretty=oneline --abbrev-commit * 0c1ac6c (HEAD -> SCTT_for_other_tables) Create SCTT for ContractorTypeI18n * f45a919 Create SCTT for Contractor * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement * 7e4cac9 Create SCTT for Language * a0607d1 Fixed broken tests for 'Person' * 1d0a1b2 Create SCTT for DocumentFile Because of this the commit:5b85d64 Implement script to test CORS is lost It is not on any branch and with less attention it will be forgotten. Is this behavior expected? Maybe I do something wrong?
BUG: Merge commits are displayed by `--cherry-pick` despite on they introduce same change
The `--cherry-pick` option states: >Omit any commit that introduces the same change as another commit on the >“other side” For next git command I see next tree: $ git log --graph --decorate --pretty=oneline --abbrev-commit --cherry-mark --boundary --left-right < bc2820d (openapi3) Merge branch 'openapi3_exception_handling' into openapi3 |\ | = 4e1e0aa Testcase for not_found/exception requests to api | = b39673d 'not_found' templates should not be probed automatically. Only when fallback | = a8677df Dump empty schemas and non empty data | = 27db48f Implemente before_render hook |/ < aa60f0a Merge branch 'hide_temporal_interface' into openapi3 |\ | = 5dd02f2 Mutate current object after update | = d58c0ab Install missed modules |/ | > b8d09ce (xtucha/openapi3) Merge branch 'openapi3_exception_handling' into openapi3 | |\ | | = b6362ad Testcase for not_found/exception requests to api | | = dc926cc 'not_found' templates should not be probed automatically. Only when fallback | | = 55dc88d Dump empty schemas and non empty data | | = 8369185 Implemente before_render hook | |/ | > c03438d Merge branch 'hide_temporal_interface' into openapi3 | |\ | | = d534cc4 Mutate current object after update | | = 1b6af27 Install modules required by MonkeyMan | |/ | > a3b7230 Clarify schema |/ o f5b06ed Assign some defaults If I want to see only new commit I add `--left-only` option and get merge commits in output. < bc2820d (openapi3) Merge branch 'openapi3_exception_handling' into < aa60f0a Merge branch 'hide_temporal_interface' into openapi3 This commits introduce same change as another merge commit on the "other side" Thus they should not be displayed
Re: Can not save changes into stash
I even can not drop local changes: $ git checkout local.conf error: pathspec 'local.conf' did not match any file(s) known to git. $ git log local.conf commit 6df8bab88fd703c6859954adc51b2abaad8f59ec Author: Eugen Konkov <kes-...@yandex.ru> Date: Wed May 9 15:31:02 2018 +0300 Implement module which allow override target option Most usefull to configure application on developer host 09.05.2018, 16:25, "KES" <kes-...@yandex.ru>: > How to reproduce: > > $ git update-index --skip-worktree conf/local.conf > $ git pull > Updating 0cd50c7..bde58f8 > error: Your local changes to the following files would be overwritten by > merge: > conf/local.conf > Please commit your changes or stash them before you merge. > Aborting > $ git stash save > No local changes to save
Can not save changes into stash
How to reproduce: $ git update-index --skip-worktree conf/local.conf $ git pull Updating 0cd50c7..bde58f8 error: Your local changes to the following files would be overwritten by merge: conf/local.conf Please commit your changes or stash them before you merge. Aborting $ git stash save No local changes to save
Re: Improve `git log -L` functionality
uh... seems nobody is interested in this functionality ( 06.03.2018, 17:46, "KES" <kes-...@yandex.ru>: > Hi. > I want to `Trace the evolution of the line range`. > And not committed change is sort of evolution and should be taken into > account by -L option. > > Currently I MUST `stash save` change, > look actual line number, > trace evolution, > `stash pop` to bring back current change. > > EXPECTED: > Allow to use those line numbers which I see in my editor > without excess `stash save/stash pop` commands > > If file has not committed change then this change maybe shown by `-L` as > commit NOT COMMITTED YET > If file staged 'commit STAGED' > > More description what is comming on: > https://stackoverflow.com/q/49130112/4632019
Improve `git log -L` functionality
Hi. I want to `Trace the evolution of the line range`. And not committed change is sort of evolution and should be taken into account by -L option. Currently I MUST `stash save` change, look actual line number, trace evolution, `stash pop` to bring back current change. EXPECTED: Allow to use those line numbers which I see in my editor without excess `stash save/stash pop` commands If file has not committed change then this change maybe shown by `-L` as commit NOT COMMITTED YET If file staged 'commit STAGED' More description what is comming on: https://stackoverflow.com/q/49130112/4632019
Re: Feature request: Improve diff algorithm
One yet more: @@ -43,22 +44,25 @@ sub tariff_title { 1; __DATA__ -@@ control/tariff.css -* { -margin: 0; -padding: 0; -border: 0; --webkit-box-sizing: border-box; -box-sizing: border-box; } -html { -background-color: #121212; -color: white; -font-family: 'Roboto', 'Arial', sans-serif; -font-size: 16px; } -a { -cursor: pointer; } +@@ control/tariff_about_old.html.ep + + + +<%= $title %> + + +<%== $option1 %><%= stash->{ comment1 }? " (" .stash->{ comment1 }.")": '' %> + + + +<%== $option2 %><%= stash->{ comment2 }? " (" .stash->{ comment2 }.")": '' %> + + +@@ control/tariff.css /* BASE BUTTON FOR TARIFF CARD */ .button { display: -webkit-box; But it would be better if `@@ control/tariff.css` were untouched: @@ -43,22 +44,25 @@ sub tariff_title { 1; __DATA__ + + +@@ control/tariff_about_old.html.ep + + + +<%= $title %> + + +<%== $option1 %><%= stash->{ comment1 }? " (" .stash->{ comment1 }.")": '' %> + + + +<%== $option2 %><%= stash->{ comment2 }? " (" .stash->{ comment2 }.")": '' %> + + @@ control/tariff.css -* { -margin: 0; -padding: 0; -border: 0; --webkit-box-sizing: border-box; -box-sizing: border-box; } -html { -background-color: #121212; -color: white; -font-family: 'Roboto', 'Arial', sans-serif; -font-size: 16px; } -a { -cursor: pointer; } - - /* BASE BUTTON FOR TARIFF CARD */ .button { display: -webkit-box;
Re: Feature request: Improve diff algorithm
One yet more: @@ -141,5 +86,9 @@ // } - OP* o; + SV *tvs = newSVpvs( "ScalarHistory" ); + SV *tva = newSVpvs( "ArrayHistory" ); + SV *tvh = newSVpvs( "HashHistory" ); + + OP *o; while( PL_op ) {
Re: Feature request: Improve diff algorithm
Here is another place where diff can be improved: @@ -141,8 +140,9 @@ My_runops(pTHX) // Do not trace variables in DB:: module if( SvOK( inDB ) ) continue; - sv_inc_nomg( inDB ); + // save_item( inDB ); + sv_inc_nomg( inDB ); dSP; SINFO; SAVETMPS; // printf( "SWITCH\n" ); This would be better it the patch looks like: ( this patch is manually created just to light the idea. It may contain errors) @@ -140,6 +140,7 @@ My_runops(pTHX) // Do not trace variables in DB:: module if( SvOK( inDB ) ) continue; + +// save_item( inDB ); sv_inc_nomg( inDB ); - dSP; SINFO; SAVETMPS; As we can see, here the `sv_inc_nomg( inDB );` line is unchanged and `// save_item( inDB );` is added. Here we just add/remove empty lines and patch looks more better. I think (and this is my assumption), the the diff algorithm should take into account the string length. This is more better to add/remove more short lines 21.11.2016, 20:55, "Jacob Keller" <jacob.kel...@gmail.com>: > On Mon, Nov 21, 2016 at 10:17 AM, Stefan Beller <sbel...@google.com> wrote: >> On Mon, Nov 21, 2016 at 8:56 AM, Jacob Keller <jacob.kel...@gmail.com> >> wrote: >>> On Mon, Nov 21, 2016 at 12:11 AM, KES <kes-...@yandex.ru> wrote: >>>> Hi. >>> >>> Hi, >>> >>>> I have some question about how diff works then give proposal: >>>> >>>> it will be very useful for each "symbol" store additional meta info as >>>> source line length. So in this case when git counter two equal sequence of >>>> commands it will do further comparison: Adds 23 chars deletes none VS adds >>>> 75 chars deletes 46 >>>> >>>> Actually I got this: >>>> >>>> @@ -129,8 +132,9 @@ sub _preprocess_message { >>>> sub _process_message { >>>> my ($self, $message) = @_; >>>> >>>> - my $method = ref($message) eq 'HASH' ? $message->{method} : undef; >>>> + my $time = [ gettimeofday ]; >>>> >>>> + my $method = ref($message) eq 'HASH' ? $message->{method} : undef; >>>> return $self->send_error(ERROR_REQUEST_INVALID) >>>> unless defined($method); >>>> >>>> Instead of expected: >>>> @@ -129,6 +132,8 @@ sub _preprocess_message { >>>> sub _process_message { >>>> my ($self, $message) = @_; >>>> >>>> + my $time = [ gettimeofday ]; >>>> + >>>> my $method = ref($message) eq 'HASH' ? $message->{method} : undef; >>>> - >>>> return $self->send_error(ERROR_REQUEST_INVALID) >>> >>> Have you tried the various options for git to search for smaller >>> diffs? Or using the other diff algorithms such as histogram instead of >>> patience? >> >> The newest version of Git comes with a flag to move around the diff >> better, based on the work at https://github.com/mhagger/diff-slider-tools > > Unfortunately in this case, I'm not convinced that it will improve the > diff. It's worth a try as well though. > > Thanks, > Jake
Re: How to view diff when doing `git push --force`
> At this point, no, but in the future instead of --force use > --force-with-lease=: where is e.g. $(git > rev-parse HEAD). Thank you. But I have found next command to see what were changed. For example if someone did forced push and I wanna see changes before merge remote git log --graph --decorate --pretty=oneline --abbrev-commit --cherry-mark --boundary --left-right But is there an option to view changes in amended commits? See the last code post about unknown option in the next answer : https://stackoverflow.com/a/48149931/4632019 If there is no such option. Will it be useful to have it?
Re: Git allow to unconditionaly remove files on other developer host
> This happens *only* if the other developers also have somefile mentioned > in their .gitignore. It will be mentioned, because of I can add/push, wait developers pull, add/push I can do this because I was angry or was fired. So this is my last "surprise" for others )) >> EXPECTED: git should warn about that content will be replaced and do not >> pull/checkout until we force pull/checkout > > If somefile is *not* mentioned in their .gitignore, the file is not > removed and there is a warning. As you can see the file is not just ignored in my case it is important because added to the repo we can think of some sort of default configuration stored in repo. But added to ignore file because developers do not want to track local changes (every developer has own options when configure local instance of application) it *this very important* to not lose these options while switching between branches or pull from remote. And I do not expect and do not want to get such "surprises" from anyone
-C options do not work for code evaluation
Hi. I run this command: git log --graph --decorate --pretty=oneline --abbrev-commit --color-moved -C -L 534,545:lib/DB/Hooks.pm at some point of evalutation I see: http://joxi.net/Y2L4GQ0in480l2 * e348241 Wrap whole DB::DB into by moving DB::db into DB::interact | | diff --git a/lib/DB/Hooks.pm b/lib/DB/Hooks.pm | --- a/lib/DB/Hooks.pm | +++ b/lib/DB/Hooks.pm | @@ -528,5 +528,12 @@ | - dbcall \, 'btrap', $source, $f, $l; | - dbcall \, 'interact'; | - dbcall \, 'atrap'; | +sub db { | + my $dd = DB::new if DB::state( 'dbcall' ); | + DB::start_dd if $DB::DB || DB::state( 'dbcall' ); | + local $DB::DB = 1; | + | + _context; | + my $dbg = DB::new \_context; | + | + my( undef, $f, $l ) = caller(1); | + dbcall \, $f, $l; | } | When I look at commit e348241 I can see that code is moved: http://joxi.net/eAOMjW1I4W7LBm commit e348241bfb9ba563c82d28c05d3f45ab9c1a765d Author: Eugen Konkov <kes-...@yandex.ru> Date: Fri Jan 5 15:58:17 2018 +0200 Wrap whole DB::DB into by moving DB::db into DB::interact This allow us to not wrap each call into diff --git a/lib/DB/Hooks.pm b/lib/DB/Hooks.pm index 6ade20a..dabe701 100644 --- a/lib/DB/Hooks.pm +++ b/lib/DB/Hooks.pm @@ -490,23 +490,16 @@ sub goto { } -sub db { -my $dd = DB::new if DB::state( 'dbcall' ); -DB::start_dd if $DB::DB || DB::state( 'dbcall' ); -local $DB::DB = 1; -_context; -my $dbg = DB::new \_context; - - -my( undef, $f, $l ) = caller(1); +sub interact { +my( $f, $l ) = @_; my $source = DB::source( $f )->[ $l ]; chomp $source; -dbcall \, 'trace', $source, $f, $l if $DB::trace; +emit( 'trace', $source, $f, $l ) if $DB::trace; ... #<<<http://joxi.ru/vAWMwOZIkNy7Rm * e348241 Wrap whole DB::DB into by moving DB::db into DB::interact | | diff --git a/lib/DB/Hooks.pm b/lib/DB/Hooks.pm | --- a/lib/DB/Hooks.pm | +++ b/lib/DB/Hooks.pm | @@ -492,21 +492,14 @@ | | -sub db { | - my $dd = DB::new if DB::state( 'dbcall' ); | - DB::start_dd if $DB::DB || DB::state( 'dbcall' ); | - local $DB::DB = 1; | | - _context; | - my $dbg = DB::new \_context; | - | - | - my( undef, $f, $l ) = caller(1); | +sub interact { | + my( $f, $l ) = @_; | |my $source = DB::source( $f )->[ $l ]; chomp $source; | - dbcall \, 'trace', $source, $f, $l if $DB::trace; | + emit( 'trace', $source, $f, $l ) if $DB::trace; | |my @trap; |if( my $info = DB::traps( $f )->{ $l } ) { | - @trap = dbcall \, 'trap', $info, $f, $l; | + @trap = emit( 'trap', $info, $f, $l ); |# Stop unconditionally if there is no subscribers for the event |@trap = (1) unless @trap; |} * 30c07c0 If we come from { dbcall } start debugger debugging too | | diff --git a/lib/DB/Hooks.pm b/lib/DB/Hooks.pm | --- a/lib/DB/Hooks.pm | +++ b/lib/DB/Hooks.pm | @@ -489,20 +489,21 @@ | | sub db { | - DB::start_dd if $DB::DB; | + my $dd = DB::new if DB::state( 'dbcall' ); | + DB::start_dd if $DB::DB || DB::state( 'dbcall' ); |local $DB::DB = 1; | |_context; |my $dbg = DB::new \_context; | | |my( undef, $f, $l ) = caller(1); | |my $source = DB::source( $f )->[ $l ]; chomp $source; |dbcall \, 'trace', $source, $f, $l if $DB::trace; | |my @trap; |if( my $info = DB::traps( $f )->{ $l } ) { |@trap = dbcall \, 'trap', $info, $f, $l; |# Stop unconditionally if there is no subscribers for the event |@trap = (1) unless @trap; |} 1. In the example above moved code is not displayed as moved. It seems the whole changeset (commit) is not inspected despite on the `-C` option is supplied 2. Please provide an option which will allow to follow moved code (maybe this should be done by default, because 71% (77%) of code in interested block is moved and not changed) | @@ -528,5 +528,12 @@ | - dbcall \, 'btrap', $source, $f, $l; | - dbcall \, 'interact'; | - dbcall \, 'atrap'; | +sub db { | + my $dd = DB::new if DB::state( 'dbcall' ); | + DB::start_dd if $DB::DB || DB::state( 'dbcall' ); | + local $DB::DB = 1; | + | + _context; | + my $dbg = DB::new \_context; | + | + my( undef, $f, $l ) = caller(1); | + dbcall \, $f, $l; | } Maybe supply interactive mode which will suggest where to follow Thank you
Feature request: Reduce amount of diff in patch
Hi. I get often patches which can be minimized: @@ -60,11 +64,8 @@ sub _get_filter { address=> { -like => \[ '?', "%$search%" ] }, company=> { -like => \[ '?', "%$search%" ] }, country_code => { '=' => \[ 'UPPER(?)' => $search ] }, -]); -$users = $users->search( $filter, { -prefetch => { Packages => { Ips => { Subnet => { Server => 'Locality' , -}); +]); return $users; This patch can be minimized to: @@ -60,11 +64,8 @@ sub _get_filter { address=> { -like => \[ '?', "%$search%" ] }, company=> { -like => \[ '?', "%$search%" ] }, country_code => { '=' => \[ 'UPPER(?)' => $search ] }, ]); -$users = $users->search( $filter, { -prefetch => { Packages => { Ips => { Subnet => { Server => 'Locality' , -}); return $users; May you please fix the git to generate minimized patches? Thank you
Error: Permition denied. git should not try to access root account if I work under common user
Hi. When I use `git pull -v --rebase` command under user I got this error: POST git-upload-pack (947 bytes) POST git-upload-pack (452 bytes) remote: warning: unable to access '/root/.config/git/attributes': Permission denied remote: Counting objects: 4, done. remote: Compressing objects: 100% (4/4), done. remote: Total 4 (delta 3), reused 0 (delta 0) Unpacking objects: 100% (4/4), done. >From https:///gitdev/main b446c31..f275d62 master -> origin/master = [up to date] buy_dev-> origin/buy_dev Created autostash: 48d1246 HEAD is now at 3ecd306 Do not guard by default Changes from b446c313d9a9caccfeb34ef2c521c4ac03c24c6e to f275d62585211806e8e0b2350bbf4f0f3025da79: conf/app.staging.conf | 1 + 1 file changed, 1 insertion(+) First, rewinding head to replay your work on top of it... Applying: BUGFIX: Do not fall if we are creating new database Applying: Do not pull data from server. Do not count all rows Applying: Do not guard by default Applied autostash. git should not try to access root account if I work under common user
Git allow to unconditionaly remove files on other developer host
Hi. That curious, but git allow to unconditionally delete files on other developer host when he do `git pull` How to reproduce: 1. File should be ignored: echo "somefile" >> .gitignore 2. Add this ignored file into repository git add -f somefile 3. Push changes to origin git push 4. When other developer has also 'somefile' on his host and when he does git pull Content of hist local `somefile` file will be replaced by content pushed by first developer EXPECTED: git should warn about that content will be replaced and do not pull/checkout until we force pull/checkout
How to view diff when doing `git push --force`
Hi. I have done `git push --force` but I forget to `pull`, Counting objects: 7, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 765 bytes | 0 bytes/s, done. Total 7 (delta 6), reused 0 (delta 0) To xxxgit:cry/cry.git + 48e9058...117ee39 staging -> staging (forced update) But I can not view diff: git show 48e9058...117ee39 fatal: ambiguous argument '48e9058...117ee39': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' May I pull info about changes that was deleted?
Not expected merge conflict output
Hi. I have merge conflict and this output: --- a/crypto/lib/Crypto/Routes.pm +++ b/crypto/lib/Crypto/Routes.pm @@@ -98,17 -94,16 +98,36 @@@ sub register ,payment_cancel_landing => '/payment-cancel' }}); # Route configuration is moved from plugin: ++<<< ours +$rn->get( '/stripe/payment_success' )->to( 'Stripe#payment_success' )->name( 'stripe_payment_s +$rn->get( '/stripe/payment_cancel' )->to( 'Stripe#payment_cancel' )->name( 'stripe_payment_c +$rn->options( '/stripe' )->to( 'Stripe#options' )->name( 'stripe_options' ); +$rn->post( '/stripe/payment/create', { required_level => 'user' } )->to( 'Stripe#payment_creat +$rn->post( '/stripe/payment/execute', { required_level => 'user' } )->to( 'Stripe#payment_exec ++||| base ++$guest->get( '/stripe/payment_success' )->to( 'Stripe#payment_success' )->name( 'stripe_paymen ++$guest->get( '/stripe/payment_cancel' )->to( 'Stripe#payment_cancel' )->name( 'stripe_paymen ++$guest->options( '/stripe' )->to( 'Stripe#options' )->name( 'stripe_options' ); ++$user->post( '/stripe/payment/create' )->to( 'Stripe#payment_create' )->name( 'stripe_paymen ++$user->post( '/stripe/payment/execute' )->to( 'Stripe#payment_execute' )->name( 'stripe_paymen ++ ++$guest->post( '/stripe/hook' )->to( 'Stripe#hook' )->name( 'stripe_hook' ); ++=== + $guest->get( '/stripe/payment_success' )->to( 'Stripe#payment_success' )->name( 'stripe_paymen + $guest->get( '/stripe/payment_cancel' )->to( 'Stripe#payment_cancel' )->name( 'stripe_paymen + $guest->options( '/stripe' )->to( 'Stripe#options' )->name( 'stripe_options' ); + $user->post( '/stripe/payment/create' )->to( 'Stripe#payment_create' )->name( 'stripe_paymen + $user->post( '/stripe/payment/execute' )->to( 'Stripe#payment_execute' )->name( 'stripe_paymen + + $guest->post( '/stripe/hook' )->to( 'Stripe#hook' )->name( 'stripe_hook' ); + $guest->get ( '/stripe/:form' )->to( 'Stripe#button' ); ++>>> theirs +$rn->post( '/stripe/hook' )->to( 'Stripe#hook' )->name( 'stripe_hook' ); +# Static routes +# QR code dowlnload url +$app->routes->get('/uploads/qrcode/:file')->name('qr_url'); But I expect this output: --- a/crypto/lib/Crypto/Routes.pm +++ b/crypto/lib/Crypto/Routes.pm @@@ -98,17 -94,16 +98,36 @@@ sub register ,payment_cancel_landing => '/payment-cancel' }}); # Route configuration is moved from plugin: ++<<< ours +$rn->get( '/stripe/payment_success' )->to( 'Stripe#payment_success' )->name( 'stripe_payment_s +$rn->get( '/stripe/payment_cancel' )->to( 'Stripe#payment_cancel' )->name( 'stripe_payment_c +$rn->options( '/stripe' )->to( 'Stripe#options' )->name( 'stripe_options' ); +$rn->post( '/stripe/payment/create', { required_level => 'user' } )->to( 'Stripe#payment_creat +$rn->post( '/stripe/payment/execute', { required_level => 'user' } )->to( 'Stripe#payment_exec +$rn->post( '/stripe/hook' )->to( 'Stripe#hook' )->name( 'stripe_hook' ); ++||| base ++$guest->get( '/stripe/payment_success' )->to( 'Stripe#payment_success' )->name( 'stripe_paymen ++$guest->get( '/stripe/payment_cancel' )->to( 'Stripe#payment_cancel' )->name( 'stripe_paymen ++$guest->options( '/stripe' )->to( 'Stripe#options' )->name( 'stripe_options' ); ++$user->post( '/stripe/payment/create' )->to( 'Stripe#payment_create' )->name( 'stripe_paymen ++$user->post( '/stripe/payment/execute' )->to( 'Stripe#payment_execute' )->name( 'stripe_paymen ++ ++$guest->post( '/stripe/hook' )->to( 'Stripe#hook' )->name( 'stripe_hook' ); ++=== + $guest->get( '/stripe/payment_success' )->to( 'Stripe#payment_success' )->name( 'stripe_paymen + $guest->get( '/stripe/payment_cancel' )->to( 'Stripe#payment_cancel' )->name( 'stripe_paymen + $guest->options( '/stripe' )->to( 'Stripe#options' )->name( 'stripe_options' ); + $user->post( '/stripe/payment/create' )->to( 'Stripe#payment_create' )->name( 'stripe_paymen + $user->post( '/stripe/payment/execute' )->to( 'Stripe#payment_execute' )->name( 'stripe_paymen + + $guest->post( '/stripe/hook' )->to( 'Stripe#hook' )->name( 'stripe_hook' ); + $guest->get ( '/stripe/:form' )->to( 'Stripe#button' ); ++>>> theirs +# Static routes +# QR code dowlnload url +$app->routes->get('/uploads/qrcode/:file')->name('qr_url'); Because this diff has less difference between ours&, Also This (second expected patch) +# Static routes +# QR code dowlnload url +$app->routes->get('/uploads/qrcode/:file')->name('qr_url'); is less in compare to (first not expected): +$rn->post( '/stripe/hook' )->to( 'Stripe#hook' )->name( 'stripe_hook' ); +# Static routes +# QR code dowlnload url +$app->routes->get('/uploads/qrcode/:file')->name('qr_url'); Did I wrong and first output is right thing or maybe I
feature request: allow to stash changed files
http://stackoverflow.com/questions/3040833/stash-only-one-file-out-of-multiple-files-that-have-changed-with-git#comment32451416_3040833 Sometimes poople are forced to save stash for changed files. But there is no such option (
git mergetool Segmentation fault
I suppose this is some bug. Because `Segmentation fault` is not expected in any case http://stackoverflow.com/questions/41362676/how-to-resolve-merge-conflict-while-rebasing
Feature request: Improve diff algorithm
Hi. I have some question about how diff works then give proposal: it will be very useful for each "symbol" store additional meta info as source line length. So in this case when git counter two equal sequence of commands it will do further comparison: Adds 23 chars deletes none VS adds 75 chars deletes 46 Actually I got this: @@ -129,8 +132,9 @@ sub _preprocess_message { sub _process_message { my ($self, $message) = @_; -my $method = ref($message) eq 'HASH' ? $message->{method} : undef; +my $time = [ gettimeofday ]; +my $method = ref($message) eq 'HASH' ? $message->{method} : undef; return $self->send_error(ERROR_REQUEST_INVALID) unless defined($method); Instead of expected: @@ -129,6 +132,8 @@ sub _preprocess_message { sub _process_message { my ($self, $message) = @_; +my $time = [ gettimeofday ]; + my $method = ref($message) eq 'HASH' ? $message->{method} : undef; - return $self->send_error(ERROR_REQUEST_INVALID) Details: http://stackoverflow.com/questions/40550751/unexpected-result-in-git-diff/40552165?noredirect=1#comment68648377_40552165
Diff impromements: keep block whole
Does it be more meaning full which change was done when diff will be displayed as: @@ -1278,6 +1311,16 @@ sub process { if( ref $result eq 'HASH' ) { $code = $result->{ code }; @args = DB::eval( $result->{ expr } ); redo PROCESS; } + elsif( ref $result eq 'ARRAY' ) { + $code = shift @$result; + @args = (); + for my $expr ( @$result ) { + push @args, [ DB::eval( $expr ) ]; + } + + redo PROCESS; + } instead of: @@ -1278,6 +1311,16 @@ sub process { if( ref $result eq 'HASH' ) { $code = $result->{ code }; @args = DB::eval( $result->{ expr } ); + + redo PROCESS; + } + elsif( ref $result eq 'ARRAY' ) { + $code = shift @$result; + @args = (); + for my $expr ( @$result ) { + push @args, [ DB::eval( $expr ) ]; + } + redo PROCESS; }
Why patch is not showed at log?
I have patch: diff --git a/t b/t index ced22c4..992533b 100644 --- a/t +++ b/t @@ -1,2 +1,2 @@ asdf -asdf \ No newline at end of file +asdf When I commit it I do not see it at log: commit 1efee9908a734c40194ffc07e7793afd2e386fbc Author: x Date: Wed Sep 7 11:09:04 2016 +0300 asdf commit 4f429665850cb929f73f1463bedd978dd8b68009 Author: x Date: Wed Sep 7 11:05:20 2016 +0300 asdf diff --git a/t b/t new file mode 100644 index 000..ced22c4 --- /dev/null +++ b/t @@ -0,0 +1,2 @@ +asdf +asdf \ No newline at end of file Why I do not see changes at log when 'new line' was added at the end of file?
improve status message
Hi When we do git pull -v --rebase We got this: remote: Counting objects: 7, done. remote: Compressing objects: 100% (7/7), done. remote: Total 7 (delta 5), reused 0 (delta 0) Unpacking objects: 100% (7/7), done. >From ssh://slab/alexclear/ontico 2b541e2..2c17d76 master -> origin/master Changes from 2b541e2bbd23ab5c375c4ce1e0fae5255470a5e7 to 2c17d767934f7f6784d2e0411c7a3a9bfc9c4d08: x | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) First, rewinding head to replay your work on top of it... That will be better if this 2b541e2bbd23ab5c375c4ce1e0fae5255470a5e7 to 2c17d767934f7f6784d2e0411c7a3a9bfc9c4d08 will be replaced by this 2b541e2bbd23ab5c375c4ce1e0fae5255470a5e7..2c17d767934f7f6784d2e0411c7a3a9bfc9c4d08 This will allow us to copy/paste this string into 'diff' command git diff 2b541e2bbd23ab5c375c4ce1e0fae5255470a5e7..2c17d767934f7f6784d2e0411c7a3a9bfc9c4d08 In compare to first version it give error: git diff 2b541e2bbd23ab5c375c4ce1e0fae5255470a5e7 to 2c17d767934f7f6784d2e0411c7a3a9bfc9c4d08 fatal: ambiguous argument 'to': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' Thank you.
Unexpected diff is shown with -w -b options in effect
Hi For this diff diff --git a/app/public/v2/index.html b/app/public/v2/index.html index f73ba73..3af0c64 100644 --- a/app/public/v2/index.html +++ b/app/public/v2/index.html @@ -21,11 +21,15 @@ - - MOV - ADD - DEL - + + + MOV + ADD + DEL + + + + I see next: diff --git a/app/public/v2/index.html b/app/public/v2/index.html index f73ba73..d415c2d 100644 --- a/app/public/v2/index.html +++ b/app/public/v2/index.html @@ -21,12 +21,16 @@ - + + MOV + + + IS NOT EXPECTED But I expect to see: diff --git a/app/public/v2/index.html b/app/public/v2/index.html index f73ba73..d415c2d 100644 --- a/app/public/v2/index.html +++ b/app/public/v2/index.html @@ -21,12 +21,16 @@ - + + MOV + + + << EXPECT THIS This seems to me a bug or should I apply some extra options to get expected behaviour? PS$ git --version git version 2.8.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Can not 'git add file'
Hi. How to reproduce $ git-number On branch master Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) 1 modified: ../lib/Devel/DebugHooks.pm 2 modified: ../lib/Devel/KillPrint.pm 3 modified: 00-simple.t Untracked files: (use "git add ..." to include in what will be committed) 4 ../lib/Devel/DebugHooks/ 5 ../lib/Devel/ImportArgs.pm 6 ../lib/Devel/KillPrintTest.pm 7 ../lib/Devel/KillPrint_scope.pm 8 ../lib/Devel/PkgAtCompileTime.pm 9 ../lib/Devel/t.pl 10 lib/Devel/AutoInit.pm 11 lib/Devel/DZVii.pm no changes added to commit (use "git add" and/or "git commit -a") $ git add -p ../lib/Devel/DebugHooks/Commands.pm No changes. I want to start track file here, but I do not want to stage while file. It seems the git can not process this case and do not allow me to complete that. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Improving auto conflict resolving while merge
Hi. **To not apply big patches, I will supply links to public repository Lets start 1. git clone https://github.com/KES777/Plack 2. git show ed485bf75a6 Nothing interesting. Usual merge conflict while merge branch 'feature/doc_contribute' to 'master' But I was interested by this part: my $app = sub { my $env = shift; +<<< HEAD +=== + my $app = sub { + my $env = shift; + +>>> master I know that some code were cherry picked(??) by maintainer from by branch. Ans this is the part which are same in master and branch. So I not expect conflict here. I start to dig. I compare Log4perl.pm files from branch and master 3. git checkout feature/doc_contribution 4. cd lib/Plack/Middleware 5. git diff d095870 Log4perl.pm I see that both master and branch has same resulting changes: @@ -36,10 +35,10 @@ __END__ =head1 NAME -Plack::Middleware::Log4perl - Uses Log::Log4perl to configure logger +Plack::Middleware::Log4perl - Uses Log::Log4perl to configure psgix.logger =head1 SYNOPSIS - + # How to use logger in your app my $app = sub { my $env = shift; @@ -53,18 +52,25 @@ Plack::Middleware::Log4perl - Uses Log::Log4perl to configure logger But this part of code were edited in both branches too: The branch were started at this commit: 0a5ff8427 6. git diff 0a5ff8427 @@ -35,14 +35,28 @@ __END__ =head1 NAME -Plack::Middleware::Log4perl - Uses Log::Log4perl to configure logger +Plack::Middleware::Log4perl - Uses Log::Log4perl to configure psgix.logger =head1 SYNOPSIS + # How to use logger in your app + my $app = sub { + my $env = shift; - use Log::Log4perl; + $env->{'psgix.logger'}({ level => 'error', message => 'Hi' }); + + return [ + '200', + [ 'Content-Type' => 'text/plain' ], + [ "Hello World" ], + ]; + }; 7. git checkout master 8. git diff 0a5ff8427 @@ -39,28 +40,41 @@ Plack::Middleware::Log4perl - Uses Log::Log4perl to configure logger =head1 SYNOPSIS - use Log::Log4perl; + my $app = sub { + my $env = shift; + + $env->{'psgix.logger'}({ level => 'error', message => 'Hi' }); + + return [ + '200', + [ 'Content-Type' => 'text/plain' ], + [ "Hello World" ], + ]; + }; + I repeat for emphasis. In the resulting file we have same code and not expect conflict. At this point I have same changes on master and branch. master head is d095870 branch head is a3db36a fork point is 0a5ff84 Comparing step-by-step (A) git diff 0a5ff84..d095870 (B) git diff 0a5ff84..a3db36a Find patches which apply to same lines =head1 SYNOPSIS - use Log::Log4perl; + my $app = sub { + my $env = shift; + + $env->{'psgix.logger'}({ level => 'error', message => 'Hi' }); + + return [ + '200', + [ 'Content-Type' => 'text/plain' ], + [ "Hello World" ], + ]; + }; + =head1 SYNOPSIS + # How to use logger in your app + my $app = sub { + my $env = shift; - use Log::Log4perl; + $env->{'psgix.logger'}({ level => 'error', message => 'Hi' }); + + return [ + '200', + [ 'Content-Type' => 'text/plain' ], + [ "Hello World" ], + ]; + }; And check with (C) git diff a3db36a..d095870 =head1 SYNOPSIS - # How to use logger in your app + my $app = sub { my $env = shift; (D) So this merge conflict (the result of `git checkout master; git merge feature/doc_contribution`) @@@ -36,13 -35,13 +36,19 @@@ __END_ =head1 NAME - Plack::Middleware::Log4perl - Uses Log::Log4perl to configure logger + Plack::Middleware::Log4perl - Uses Log::Log4perl to configure psgix.logger =head1 SYNOPSIS + # How to use logger in your app + my $app = sub { + my $env = shift; ++<<< HEAD + my $app = sub { + my $env = shift; + ++=== ++>>> feature/doc_contribution $env->{'psgix.logger'}({ level => 'error', message => 'Hi' }); return [ can be simplified to: @@@ -36,13 -35,13 +36,19 @@@ __END_ =head1 NAME - Plack::Middleware::Log4perl - Uses Log::Log4perl to configure logger + Plack::Middleware::Log4perl - Uses Log::Log4perl to configure psgix.logger =head1 SYNOPSIS + # How to use logger in your app my $app = sub { my $env = shift; NEXT Next merge conflict seems this: (A) + }; + + # Use your own Log4perl configuration + use Log::Log4perl; Log::Log4perl::init('/path/to/log4perl.conf'); (B) + }; + + # Initialization. Case#1 + use Log::Log4perl; Log::Log4perl::init('/path/to/log4perl.conf'); Comparing to (C) @@ -53,18 +52,25 @@ }; - # Use your own Log4perl configuration + # Initialization. Case#1 use Log::Log4perl; Log::Log4perl::init('/path/to/log4perl.conf'); So current merge conflict (D) @@@ -51,20 -50,27 +57,33 @@@ [ "Hello World" ], ]; }; ++<<< HEAD + + + # Use your own Log4perl configuration ++=== + + + #
git diff bug? what problem may be here
When after editing I get this: mdi.Application= this; mdi.Class.TApplication.baseConstructor.apply( this, arguments ); git diff shows: mdi.Application= this; - mdi.Class.TApplication.baseConstructor.apply( this, arguments ); - //We must not create/show application node because of this is the 'document.bo - //It exists always so apply application properties to 'document.body' only - this.updateDomNode(); + mdi.Class.TApplication.baseConstructor.apply( this, arguments ); },{ Notice same lines: - mdi.Class.TApplication.baseConstructor.apply( this, arguments ); + mdi.Class.TApplication.baseConstructor.apply( this, arguments ); But when I edit like this (notice no new line between mdi.Application and mdi.Class): mdi.Application= this; mdi.Class.TApplication.baseConstructor.apply( this, arguments ); Git diff shows: mdi.Application= this; mdi.Class.TApplication.baseConstructor.apply( this, arguments ); - - //We must not create/show application node because of this is the 'document.body'. - //It exists always so apply application properties to 'document.body' only - this.updateDomNode(); },{ Why new line cause same line in patch added and removed? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Fwd: Feature request: implement '--follow' option for `git blame`
Пересылаемое сообщение 06.04.2015, 15:12, KES kes-...@yandex.ua: $ pwd /data/mdi2/classes $ git blame -L22,+1 -- utils.js 99b7a802 mdi2/utils.js (user 2015-03-26 21:54:57 +0200 22) #comment $ git blame -L22,+1 99b7a802^ -- utils.js fatal: no such path mdi2/classes/utils.js in 99b7a802^ As you have noticed, the file were in different directory in that commit $ git blame -L22,+1 99b7a802^ -- ../utils.js c5105267 (user 2007-04-10 08:00:20 + 22) #comment 2 Despite on doc The origin of lines is automatically followed across whole-file renames (currently there is no option to turn the rename-following off) blame does not follow renames. Why? **UPDATE:** Short answer `git blame` follow renames but not for `git blame COMMIT^ -- filename` But this is too hard to track file renames manually through bulk of renames and ton of history. I think, this behaviour must be fixed to silently follow renames for `git blame COMMIT^ -- filename`. Or, at least, `--follow` must be implemented, so I can: `git blame --follow COMMIT^ -- filename` The good suggestion is here: http://stackoverflow.com/questions/29468273/why-git-blame-does-not-follow-renames Завершение пересылаемого сообщения -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
git diff bug? what problem may be here
When after editing I get this: mdi.Application= this; mdi.Class.TApplication.baseConstructor.apply( this, arguments ); git diff shows: mdi.Application= this; - mdi.Class.TApplication.baseConstructor.apply( this, arguments ); - //We must not create/show application node because of this is the 'document.bo - //It exists always so apply application properties to 'document.body' only - this.updateDomNode(); + mdi.Class.TApplication.baseConstructor.apply( this, arguments ); },{ Notice same lines: - mdi.Class.TApplication.baseConstructor.apply( this, arguments ); + mdi.Class.TApplication.baseConstructor.apply( this, arguments ); But when I edit like this (notice no new line between mdi.Application and mdi.Class): mdi.Application= this; mdi.Class.TApplication.baseConstructor.apply( this, arguments ); Git diff shows: mdi.Application= this; mdi.Class.TApplication.baseConstructor.apply( this, arguments ); - - //We must not create/show application node because of this is the 'document.body'. - //It exists always so apply application properties to 'document.body' only - this.updateDomNode(); },{ Why new line cause same line in patch added and removed? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Feature request: implement '--follow' option for `git blame`
$ pwd /data/mdi2/classes $ git blame -L22,+1 -- utils.js 99b7a802 mdi2/utils.js (user 2015-03-26 21:54:57 +0200 22) #comment $ git blame -L22,+1 99b7a802^ -- utils.js fatal: no such path mdi2/classes/utils.js in 99b7a802^ As you have noticed, the file were in different directory in that commit $ git blame -L22,+1 99b7a802^ -- ../utils.js c5105267 (user 2007-04-10 08:00:20 + 22)#comment 2 Despite on doc The origin of lines is automatically followed across whole-file renames (currently there is no option to turn the rename-following off) blame does not follow renames. Why? **UPDATE:** Short answer `git blame` follow renames but not for `git blame COMMIT^ -- filename` But this is too hard to track file renames manually through bulk of renames and ton of history. I think, this behaviour must be fixed to silently follow renames for `git blame COMMIT^ -- filename`. Or, at least, `--follow` must be implemented, so I can: `git blame --follow COMMIT^ -- filename` The good answer is here: http://stackoverflow.com/questions/29468273/why-git-blame-does-not-follow-renames -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html