Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2019-07

Submitting patches using git

17 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

I’m getting better with git but I’m still having problems with basic workflows. My newest dilemma is trying to submit a patch which is actually up to date with the current master branch (https://bugs.freepascal.org/view.php?id=35140). Here’s what I do:

1) pull changes from the master remote upstream into my master branch (this is: https://github.com/graemeg/freepascal).
2) merge the updated local master branch into the feature branch and resolve any conflicts if need be.
3) remove .gitignore (which now includes thousands of .o/.ppu files which need to be deleted) and any other unrelated personal files.
4) squash all commits into a single so the patch doesn’t include the entire commit history.
5) finally make a nice clean patch using: git format-patch master --stdout > patch.diff

The problem is that since I merged the updated master branch I can’t squash commits because git complains "only commits reachable from HEAD can be modified”. Is this not how I’m supposed to keep my local feature branch up-to-date with the server? Any advice would be great.

Regards,
Ryan Joseph

Reply by email

Jonas Maebe
to Ryan Joseph
Ryan Joseph wrote 9 lines
I’m getting better with git but I’m still having problems with basic workflows. My newest dilemma is trying to submit a patch which is actually up to date with the current master branch (https://bugs.freepascal.org/view.php?id=35140). Here’s what I do: 1) pull changes from the master remote upstream into my master branch (this is: https://github.com/graemeg/freepascal). 2) merge the updated local master branch into the feature branch and resolve any conflicts if need be. 3) remove .gitignore (which now includes thousands of .o/.ppu files which need to be deleted) and any other unrelated personal files. 4) squash all commits into a single so the patch doesn’t include the entire commit history. 5) finally make a nice clean patch using: git format-patch master --stdout > patch.diff The problem is that since I merged the updated master branch I can’t squash commits because git complains "only commits reachable from HEAD can be modified”. Is this not how I’m supposed to keep my local feature branch up-to-date with the server? Any advice would be great.

You can rebase your feature branch on latest trunk/master instead of merging. I think that may even work after you have previously merged it (and it should get rid of all merge commits).

Jonas

Reply by email

Ryan Joseph
to Jonas Maebe
Show quoted text 5 lines
On Jul 20, 2019, at 1:04 PM, Jonas Maebe wrote: You can rebase your feature branch on latest trunk/master instead of merging. I think that may even work after you have previously merged it (and it should get rid of all merge commits).

I tried doing "git rebase origin/master” on the feature branch BEFORE I merged the master but it says "Current branch gen-const-new is up to date.”. What is rebase doing that it thinks the feature branch is up to date?

Regards,
Ryan Joseph

Reply by email

denisgolovan
to Ryan Joseph
I tried doing "git rebase origin/master” on the feature branch BEFORE I merged the master but it says "Current branch gen-const-new is up to date.”. What is rebase doing that it thinks the feature branch is up to date?

Generally it means all your feature branch commits are on top of origin/master.

It's a bit difficult to explain via text.
Try doing "git log --graph" before and after doing rebase and you will see it changes in feature branch to be moved (or rebased) after origin/master last commit in your feature branch.

-- Regards,
Denis Golovan

Reply by email

Martin Frb
to Ryan Joseph: I tried doing "git rebase origin/master” on the feature branch BEFORE I merged the…
Ryan Joseph wrote 8 lines
> On Jul 20, 2019, at 1:04 PM, Jonas Maebe wrote: > > You can rebase your feature branch on latest trunk/master instead of > merging. I think that may even work after you have previously merged it > (and it should get rid of all merge commits). I tried doing "git rebase origin/master” on the feature branch BEFORE I merged the master but it says "Current branch gen-const-new is up to date.”. What is rebase doing that it thinks the feature branch is up to date?

"origin/master"   is the not modified trunk?

Checkout to your branch, and try
  git rebase  -i origin/master

This should open an editor with all the git commits since you forked your branch.
Remove all the revisions that belong to trunk, only keep the ones you changed. That will move all your commits to the top.

IF this does not show all of your commits (because the branches where merged), find the revision ONE BEFORE your first commit. (say it is 0abcde):   git rebase  -i  0abcde origin/master

Reply by email

Ryan Joseph
to denisgolovan: Generally it means all your feature branch commits are on top of origin/master. It's a…
Show quoted text 6 lines
On Jul 20, 2019, at 3:01 PM, denisgolovan wrote: Generally it means all your feature branch commits are on top of origin/master. It's a bit difficult to explain via text. Try doing "git log --graph" before and after doing rebase and you will see it changes in feature branch to be moved (or rebased) after origin/master last commit in your feature branch.

I’m doing lots of trials right now but I can’t seem to get rebase to work unless I squash all the commits in the feature branch first but then I lose my commit history. I don’t know what it did but I see it merged changes from previous commits and didn’t even include all the changes from master. Very confusing.

Here’s the results of "git log —graph” on the feature branch. Does that first part look right? I feel like I messed up something from the very start but I’m not sure what.

Ryans-MacBook-Pro-2:fpc-git ryanjoseph$ git log --graph
* commit c5a6c2c0822d6c869a788a98a144e739a97d517a (HEAD -> generic_constants, origin/generic_constants) | Author: Ryan Joseph
| Date: Sat Jul 20 09:40:58 2019 -0400
|
| fixed bugs with range checking and constants + added 2 tests |
* commit 49de8113a1eb29b368d89d9e2fb7fa7c932d937e
| Author: Ryan Joseph
| Date: Mon Mar 25 10:35:47 2019 -0400
|
| reverted back bad line endings in htypechk.pas |
* commit 128d695bf83fb19de342d8e23101ec0223e08e1b
| Author: Ryan Joseph
| Date: Fri Mar 22 13:10:12 2019 -0400
|
| added 2 more tests
|
* commit 4dcdd8932d5bc50b5d87bc8e1f1a7ea4e6d5b29f
| Author: Ryan Joseph
| Date: Tue Mar 19 09:18:39 2019 -0400
|
| Fixed more operator bugs and added test
|
* commit f2039f13c74e74cb523076b27ff6559ae69ad7d1
:

Regards,
Ryan Joseph

Reply by email

denisgolovan
to Ryan Joseph: I’m doing lots of trials right now but I can’t seem to get rebase to work unless I…
Show quoted text 29 lines
Here’s the results of "git log —graph” on the feature branch. Does that first part look right? I feel like I messed up something from the very start but I’m not sure what. Ryans-MacBook-Pro-2:fpc-git ryanjoseph$ git log --graph * commit c5a6c2c0822d6c869a788a98a144e739a97d517a (HEAD -> generic_constants, origin/generic_constants) | Author: Ryan Joseph | Date: Sat Jul 20 09:40:58 2019 -0400 | | fixed bugs with range checking and constants + added 2 tests | * commit 49de8113a1eb29b368d89d9e2fb7fa7c932d937e | Author: Ryan Joseph | Date: Mon Mar 25 10:35:47 2019 -0400 | | reverted back bad line endings in htypechk.pas | * commit 128d695bf83fb19de342d8e23101ec0223e08e1b | Author: Ryan Joseph | Date: Fri Mar 22 13:10:12 2019 -0400 | | added 2 more tests | * commit 4dcdd8932d5bc50b5d87bc8e1f1a7ea4e6d5b29f | Author: Ryan Joseph | Date: Tue Mar 19 09:18:39 2019 -0400 | | Fixed more operator bugs and added test | * commit f2039f13c74e74cb523076b27ff6559ae69ad7d1 :

Have you renamed your branch?
Last time you mentioned it was "gen-const-new".
And you didn't include enough log to see origin/master (see in brackets like in your first commit).

Again your commits should be at the top of origin/master if "git rebase" did its job correctly without any conflicts. If you have conflicts, you need to resolve them one by one and do "git rebase --continue" each time.

-- Regards,
Denis Golovan

Reply by email

Ryan Joseph
to Martin Frb: "origin/master"   is the not modified trunk? Checkout to your branch, and try   git…
On Jul 20, 2019, at 4:02 PM, Martin Frb wrote: "origin/master" is the not modified trunk?

No, what I did was fork https://github.com/graemeg/freepascal and then a create new feature branches based on master. “origin” I believe refers to my forked repo on GitHub and “upstream” is the original, i.e. https://github.com/graemeg/freepascal.

So what I do when I want to keep up to date is "git pull upstream master” which updates my local “master” branch with changes from graemeg/freepascal. The problem I face now is how to get changes from master into my feature branch. Merging worked fine but then I face the problem of not being able to squash all commits before submitting patches. I’ve just learned now that rebase works BUT I need to squash commits first. Catch 22.

The real root of the problem is that I need to squash my feature branches commit history or my patches will get rejected. If that weren’t the case I would just do a merge and release the patch with full commit history.

Regards,
Ryan Joseph

Reply by email

Sven Barth
to Ryan Joseph: I’m getting better with git but I’m still having problems with basic workflows. My…
Ryan Joseph wrote
3) remove .gitignore (which now includes thousands of .o/.ppu files which need to be deleted) and any other unrelated personal files.

Why is your .gitignore so big? Mine looks like this:

=== file begin ===

# ignore binary files
*.o
*.ppu
*.exe
*.pcp
*.a
*.dll
*.ppl
*.rsj
*.bak
*.lst
*.diff
*.patch
*.wpo
*.lps
# ignore fpmake files
*.fpm
# ignore other build files
*-stamp.*
fpcmade.*
backup/
bin/
units/
* - Kopie*
fpmake
lazbuild/
fpctests/
testoutput/
*.mod
ppc*

=== file end ===

(The "* - Kopie*" one is due to me sometimes doing copies with Windows Explorer when I want to split changes that "git add -p" can't handle, same for "*.mod" for manual copies on the command line ;) )

This keeps my status output relatively clean (and I'm sure that I could improve it further):

=== output begin ===

On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)   (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   compiler/aasmcnst.pas         modified:   compiler/ppcx64.lpi
        modified:   tests/test/units/fpcunit/testcomps.pp

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        .gitconfig
        .gitignore
        compile-rtl-objpas-testrunner.bat
        compiler/cextflt.pas
        compiler/utils/fpc
        compiler/utils/mka64ins
        compiler/utils/mkarmins
        compiler/utils/mkx86ins
        compiler/utils/ppudump
        compiler/utils/ppufiles
        compiler/utils/ppumove
        output.wp-pp.txt
        packages/dyncall/
        packages/rtl-objpas/tests/testrunner.rtlobjpas         ppudump.txt
        q
        rtl-objpas-tests/
        rtl/embedded/arm/samd21g18a.pp
        tests/createlst
        tests/gparmake
        tests/output/
        tests/tbs/tb0658.pp
        tests/tstunits/i386-win32/
        tests/tstunits/tmp/
        tests/tstunits/x86_64-linux/
        tests/tstunits/x86_64-win64/
        tests/utils/concat
        tests/utils/digest
        tests/utils/dotest
        tests/utils/fail
        tests/utils/fptime
        tests/utils/testfail
        tests/webtbs/tw35019.pp
        tests/webtbs/tw35248.pp
        utils/importwinmd/
        windows-ppu.txt

no changes added to commit (use "git add" and/or "git commit -a")

=== output end ===

Regards,
Sven

Reply by email

Ryan Joseph
to denisgolovan: Have you renamed your branch? Last time you mentioned it was "gen-const-new". And you…
On Jul 20, 2019, at 4:12 PM, denisgolovan wrote: Have you renamed your branch? Last time you mentioned it was "gen-const-new”.

The branch is called “generic_constants” but I’m making temporary copies for testing so I don’t mess up the safe one.

And you didn't include enough log to see origin/master (see in brackets like in your first commit). Again your commits should be at the top of origin/master if "git rebase" did its job correctly without any conflicts. If you have conflicts, you need to resolve them one by one and do "git rebase --continue" each time.

Here’s a full log until my initial commit. You can see I haven’t merged updates from the main repo since 2018.

If you scroll down you’ll see I made a new branch from generic_constants called “generic_constants_rebase” and then did "git rebase master”. At this point it’s giving me a conflict which is from an old commit (I think from the line "Patch failed at 0005”). It like the old commit is conflicting with something from master but why is it looking at old commits?

Ryans-MacBook-Pro-2:fpc-git ryanjoseph$ git log --graph
* commit c5a6c2c0822d6c869a788a98a144e739a97d517a (HEAD -> generic_constants, origin/generic_constants) | Author: Ryan Joseph
| Date: Sat Jul 20 09:40:58 2019 -0400
|
| fixed bugs with range checking and constants + added 2 tests |
* commit 49de8113a1eb29b368d89d9e2fb7fa7c932d937e
| Author: Ryan Joseph
| Date: Mon Mar 25 10:35:47 2019 -0400
|
| reverted back bad line endings in htypechk.pas |
* commit 128d695bf83fb19de342d8e23101ec0223e08e1b
| Author: Ryan Joseph
| Date: Fri Mar 22 13:10:12 2019 -0400
|
| added 2 more tests
|
* commit 4dcdd8932d5bc50b5d87bc8e1f1a7ea4e6d5b29f
| Author: Ryan Joseph
| Date: Tue Mar 19 09:18:39 2019 -0400
|
| Fixed more operator bugs and added test
|
* commit f2039f13c74e74cb523076b27ff6559ae69ad7d1
| Author: Ryan Joseph
| Date: Sun Mar 17 16:26:40 2019 -0400
|
| Fixed binary op bugs and constant assignment bugs, added tests |
* commit 053be315080c47dea68aa52c020fcbe23225d1d3
| Author: Ryan Joseph
| Date: Sat Feb 23 15:01:58 2019 -0500
|
| better const compare in compare_defs_ext, added tests |
* commit 7f234fad6b503c0374320a81eb45d9c4e4327734
| Author: Ryan Joseph
| Date: Sat Feb 16 16:27:28 2019 -0500
|
| fixed tests
|
* commit d9cb1e6d09df6389e6f4b234ed4a13d5b2b111be
| Author: Ryan Joseph
| Date: Sat Feb 16 16:00:07 2019 -0500
|
| fixed "class procedure" bug, cleaned up some type cast errors |
* commit 2efec219041f23036508f9a35b8a7492404f29a8
| Author: Ryan Joseph
| Date: Fri Feb 15 11:00:20 2019 -0500
|
| fixed .gitignore so tests are included
|
* commit 902c7151151ccb96f2825a6eede493e9bc88af72
| Author: Ryan Joseph
| Date: Mon Feb 11 11:27:37 2019 -0500
|
| def compare for specialized refs with constants |
* commit 3dcffa470383e81d0b287ed2c27e9b6f66362014
| Author: Ryan Joseph
| Date: Sat Feb 9 17:06:54 2019 -0500
|
| adding constant type/range checking
|
* commit 02e9456d351fb6bdeac15cf14c4e50920a718a83
| Author: Ryan Joseph
| Date: Mon Jan 7 11:18:17 2019 -0700
|
| minor bug fixes
|
* commit bd76667453914106a51d31672d841b1344066e6a
| Author: Ryan Joseph
| Date: Sun Jan 6 17:49:15 2019 -0700
|
| Removed tgenericparamdef and defs from tspecializationcontext, changed separator syntax |
* commit 3ad83ffed75b20b8f52a823452824b9eaae31ee8
| Author: Ryan Joseph
| Date: Tue Nov 27 19:53:24 2018 +0700
|
| bug fix
|
* commit 3a6b595ade54ff8b7b052221d28d1fb551a9fc7e
| Author: Ryan Joseph
| Date: Tue Nov 27 12:45:52 2018 +0700
|
| changed const generic params to tconstsym
|
* commit d71e8383ebe679926598e690956b97055fada833
| Author: Ryan Joseph
| Date: Tue Nov 27 08:59:05 2018 +0700
|
| Removed tgenericparamsym* types
|
* commit 21181027340e5ab6f25f9350217ed1d4942f1e1e
| Author: Ryan Joseph
| Date: Wed Nov 14 09:19:57 2018 +0700
|
| Bug in string const constraints
|
* commit 9b2190a54dff16630ea1788ab408095bd7535547
| Author: Ryan Joseph
| Date: Tue Nov 13 19:11:21 2018 +0700
|
| Updated ppu version
|
* commit b9ff43058fe98c4e3ad176953dad5413091b1676
| Author: Ryan Joseph
| Date: Tue Nov 13 16:10:00 2018 +0700
|
| Removed type
|
* commit d84930722cd94fff57638c55e1c84d48c321f104
| Author: Ryan Joseph
| Date: Tue Nov 13 16:08:54 2018 +0700
|
| Const type restrictions
|
* commit b1483f95a0636b9f29fbdc875d17b09143bbd9ea
| Author: Ryan Joseph
| Date: Tue Nov 13 10:45:16 2018 +0700
|
| removed .gitignore
|
* commit 4e43439973af1413fbedb5c0b78cc60f668393e9
| Author: Ryan Joseph
| Date: Tue Nov 13 10:44:29 2018 +0700
|
| Generic const params can be assigned to struct consts, PPU loading, all const types accepted |
* commit e2f86ae6e5c3c52d123e3e8b32103f5136b75cf2
| Author: Ryan Joseph
| Date: Sat Nov 10 10:20:52 2018 +0700
|
| Fixed bug in type constraints, added templates for non-int consts |
* commit bf9396f1c811839707c98dd331b3432d3b55d8d1
| Author: Ryan Joseph
| Date: Thu Nov 8 19:55:24 2018 +0700
|
| bug with const param validation
|
* commit 808e63ded8053c45f21eb4397eac8632ac8f058e
| Author: Ryan Joseph
| Date: Thu Nov 8 15:53:53 2018 +0700
|
| Bug with nested const params
|
* commit 7d924cdf5359fb55bf709febe6ab9c39bb440933
| Author: Ryan Joseph
| Date: Thu Nov 8 11:18:32 2018 +0700
|
| Added const for params, disabled in mode delphi |
* commit ec518542b2da7d7f016702a82b2d05349a01a6fb
| Author: Ryan Joseph
| Date: Tue Nov 6 13:58:49 2018 +0700
|
| first commit
|
* commit d5219e371d1048ff45d345237193859910c7bdaa
| Author: Mattias Gaertner
| Date: Tue Jul 24 15:47:18 2018 +0000
|
| pastojs: changed logo
|
| git-svn-id: 3ad0048d-3df7-0310-abae-a5850022a9f2 |

======================================================

Ryans-MacBook-Pro-2:fpc-git ryanjoseph$ git rebase master First, rewinding head to replay your work on top of it... Applying: first commit
Using index info to reconstruct a base tree...
M compiler/pgenutil.pas
Falling back to patching base and 3-way merge...
Auto-merging compiler/pgenutil.pas
Applying: Added const for params, disabled in mode delphi Using index info to reconstruct a base tree...
M compiler/pgenutil.pas
.git/rebase-apply/patch:183: trailing whitespace.

warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging compiler/pgenutil.pas
Applying: Bug with nested const params
Applying: bug with const param validation
Applying: Fixed bug in type constraints, added templates for non-int consts Using index info to reconstruct a base tree...
M compiler/pgenutil.pas
M compiler/symconst.pas
M compiler/symdef.pas
M compiler/symsym.pas
.git/rebase-apply/patch:287: trailing whitespace.

     end;

warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging compiler/symsym.pas
Auto-merging compiler/symdef.pas
CONFLICT (content): Merge conflict in compiler/symdef.pas Auto-merging compiler/symconst.pas
Auto-merging compiler/pgenutil.pas
error: Failed to merge in the changes.
Patch failed at 0005 Fixed bug in type constraints, added templates for non-int consts Use 'git am --show-current-patch' to see the failed patch

Resolve all conflicts manually, mark them as resolved with "git add/rm <conflicted_files>", then run "git rebase --continue". You can instead skip this commit: run "git rebase --skip". To abort and get back to the state before "git rebase", run "git rebase --abort".

Ryans-MacBook-Pro-2:fpc-git ryanjoseph$ git log --graph
* commit da9b3b7b87fccc8a89a4c7b09e00b59a445f6317 (HEAD) | Author: Ryan Joseph
| Date: Thu Nov 8 19:55:24 2018 +0700
|
| bug with const param validation
|
* commit 8d0de2119f410d67be9f21bec01ac9ed962dee70
| Author: Ryan Joseph
| Date: Thu Nov 8 15:53:53 2018 +0700
|
| Bug with nested const params
|
* commit e34aaf737ed0c3215c6111bbdc2e34dd13fdefe0
| Author: Ryan Joseph
| Date: Thu Nov 8 11:18:32 2018 +0700
|
| Added const for params, disabled in mode delphi |
* commit 01ca2a741cb8fd18cff918f9c5ec3f2d3be74ca9
| Author: Ryan Joseph
| Date: Tue Nov 6 13:58:49 2018 +0700
|
| first commit
|
* commit ab87004ea8bbe6e8ac56835f6c8186b45173dd0f (upstream/master, master) | Author: Mattias Gaertner
:...skipping...
* commit da9b3b7b87fccc8a89a4c7b09e00b59a445f6317 (HEAD) | Author: Ryan Joseph
| Date: Thu Nov 8 19:55:24 2018 +0700
|
| bug with const param validation
|
* commit 8d0de2119f410d67be9f21bec01ac9ed962dee70
| Author: Ryan Joseph
| Date: Thu Nov 8 15:53:53 2018 +0700
|
| Bug with nested const params
|
* commit e34aaf737ed0c3215c6111bbdc2e34dd13fdefe0
| Author: Ryan Joseph
| Date: Thu Nov 8 11:18:32 2018 +0700
|
| Added const for params, disabled in mode delphi |
* commit 01ca2a741cb8fd18cff918f9c5ec3f2d3be74ca9
| Author: Ryan Joseph
| Date: Tue Nov 6 13:58:49 2018 +0700
|
| first commit
|
* commit ab87004ea8bbe6e8ac56835f6c8186b45173dd0f (upstream/master, master) | Author: Mattias Gaertner
| Date: Sat Jul 20 18:22:00 2019 +0000
:

* commit da9b3b7b87fccc8a89a4c7b09e00b59a445f6317 (HEAD) | Author: Ryan Joseph
| Date: Thu Nov 8 19:55:24 2018 +0700
|
| bug with const param validation
|
* commit 8d0de2119f410d67be9f21bec01ac9ed962dee70
| Author: Ryan Joseph
| Date: Thu Nov 8 15:53:53 2018 +0700
|
| Bug with nested const params
|
* commit e34aaf737ed0c3215c6111bbdc2e34dd13fdefe0
| Author: Ryan Joseph
| Date: Thu Nov 8 11:18:32 2018 +0700
|
| Added const for params, disabled in mode delphi |
* commit 01ca2a741cb8fd18cff918f9c5ec3f2d3be74ca9
| Author: Ryan Joseph
| Date: Tue Nov 6 13:58:49 2018 +0700
|
| first commit
|
* commit ab87004ea8bbe6e8ac56835f6c8186b45173dd0f (upstream/master, master) | Author: Mattias Gaertner
| Date: Sat Jul 20 18:22:00 2019 +0000
:...skipping...
* commit da9b3b7b87fccc8a89a4c7b09e00b59a445f6317 (HEAD) | Author: Ryan Joseph
| Date: Thu Nov 8 19:55:24 2018 +0700
|
| bug with const param validation
|
* commit 8d0de2119f410d67be9f21bec01ac9ed962dee70
| Author: Ryan Joseph
| Date: Thu Nov 8 15:53:53 2018 +0700
|
| Bug with nested const params
|
* commit e34aaf737ed0c3215c6111bbdc2e34dd13fdefe0
| Author: Ryan Joseph
| Date: Thu Nov 8 11:18:32 2018 +0700
|
| Added const for params, disabled in mode delphi |
* commit 01ca2a741cb8fd18cff918f9c5ec3f2d3be74ca9
| Author: Ryan Joseph
| Date: Tue Nov 6 13:58:49 2018 +0700
|
| first commit
|
* commit ab87004ea8bbe6e8ac56835f6c8186b45173dd0f (upstream/master, master) | Author: Mattias Gaertner
| Date: Sat Jul 20 18:22:00 2019 +0000
|
| fcl-passrc: fixed parsing generic function after type section :...skipping...
* commit da9b3b7b87fccc8a89a4c7b09e00b59a445f6317 (HEAD) | Author: Ryan Joseph
| Date: Thu Nov 8 19:55:24 2018 +0700
|
| bug with const param validation
|
* commit 8d0de2119f410d67be9f21bec01ac9ed962dee70
| Author: Ryan Joseph
| Date: Thu Nov 8 15:53:53 2018 +0700
|
| Bug with nested const params
|
* commit e34aaf737ed0c3215c6111bbdc2e34dd13fdefe0
| Author: Ryan Joseph
| Date: Thu Nov 8 11:18:32 2018 +0700
|
| Added const for params, disabled in mode delphi |
* commit 01ca2a741cb8fd18cff918f9c5ec3f2d3be74ca9
| Author: Ryan Joseph
| Date: Tue Nov 6 13:58:49 2018 +0700
|
| first commit
|
* commit ab87004ea8bbe6e8ac56835f6c8186b45173dd0f (upstream/master, master) | Author: Mattias Gaertner
| Date: Sat Jul 20 18:22:00 2019 +0000
|
| fcl-passrc: fixed parsing generic function after type section |
:...skipping...
* commit da9b3b7b87fccc8a89a4c7b09e00b59a445f6317 (HEAD) | Author: Ryan Joseph
| Date: Thu Nov 8 19:55:24 2018 +0700
|
| bug with const param validation
|
* commit 8d0de2119f410d67be9f21bec01ac9ed962dee70
| Author: Ryan Joseph
| Date: Thu Nov 8 15:53:53 2018 +0700
|
| Bug with nested const params
|
* commit e34aaf737ed0c3215c6111bbdc2e34dd13fdefe0
| Author: Ryan Joseph
| Date: Thu Nov 8 11:18:32 2018 +0700
|
| Added const for params, disabled in mode delphi |
* commit 01ca2a741cb8fd18cff918f9c5ec3f2d3be74ca9
| Author: Ryan Joseph
| Date: Tue Nov 6 13:58:49 2018 +0700
|
| first commit
|
* commit ab87004ea8bbe6e8ac56835f6c8186b45173dd0f (upstream/master, master) | Author: Mattias Gaertner
| Date: Sat Jul 20 18:22:00 2019 +0000
|
| fcl-passrc: fixed parsing generic function after type section |
| git-svn-id: 3ad0048d-3df7-0310-abae-a5850022a9f2 |
* commit e36d456d5cba95ba586375bc8bc3152590601f72 (graemeg/master) | Author: Marco van de Voort
| Date: Sat Jul 20 14:40:34 2019 +0000
|
| * lookup property published but not stored. Doesn't change much, but less trouble when opening/dualmaintaining delphi forms. |
| git-svn-id: 3ad0048d-3df7-0310-abae-a5850022a9f2

Regards,
Ryan Joseph

Reply by email

Ryan Joseph
to Sven Barth: Why is your .gitignore so big? Mine looks like this: === file begin === # ignore binary…
On Jul 20, 2019, at 4:19 PM, Sven Barth via fpc-devel wrote: Why is your .gitignore so big? Mine looks like this:

I’m sorry, what I wrote didn’t make any sense. I mean that after I delete .gitignore then all the .o etc.. files that it was ignoring now come flooding back into the project and so they need to be deleted. My git client handles it well enough but the 20k+ files stall out the UI a little. ;)

Regards,
Ryan Joseph

Reply by email

Martin Frb
to Ryan Joseph: No, what I did was fork https://github.com/graemeg/freepascal and then a create new…
Ryan Joseph wrote 10 lines
> On Jul 20, 2019, at 4:02 PM, Martin Frb wrote: > > "origin/master" is the not modified trunk? No, what I did was fork https://github.com/graemeg/freepascal and then a create new feature branches based on master. “origin” I believe refers to my forked repo on GitHub and “upstream” is the original, i.e. https://github.com/graemeg/freepascal. So what I do when I want to keep up to date is "git pull upstream master” which updates my local “master” branch with changes from graemeg/freepascal. The problem I face now is how to get changes from master into my feature branch. Merging worked fine but then I face the problem of not being able to squash all commits before submitting patches. I’ve just learned now that rebase works BUT I need to squash commits first. Catch 22. The real root of the problem is that I need to squash my feature branches commit history or my patches will get rejected. If that weren’t the case I would just do a merge and release the patch with full commit history.

Ok there are 2 questions

1) if you pull, and want to avoid merges.

git pull --rebase

will rebase instead of merge.
BUT: if you push your resulting branch to your own repro then you may need force-with-lease. That is if you had already pushed before, because then you need the same history rewrite on your server, as you did locally with the rebase.

forced push should only ever be to your own repro/server. And ideally always force-with-lease

2)
You current branch.

You can rewrite your current branch

Again find the first commit you made, that is of interest. Get the hash of the commit ONE BEFORE "0abcedef"

Whilst checked out to your branch:
git rebase -i 0abcedef

Should open an editor with all the commits in it.
Re-order them, so ALL your commits are on top.
The editor text has some doc in it. You can squash your commits now. But you can do that later, and keep the unsquashed ones too. Save and exit the editor.

git will rewrite the current branch, to have commits in the order that you specified.

------------------
If you want to play: Before you start, create a new branch at the top (HEAD) of your current branch.
That will keep the old commits in the old order under that new branches name. (reflog does the same, but this may be easier)

Reply by email

Sven Barth
to Ryan Joseph: I’m sorry, what I wrote didn’t make any sense. I mean that after I delete .gitignore…
Ryan Joseph wrote 5 lines
> On Jul 20, 2019, at 4:19 PM, Sven Barth via fpc-devel wrote: > > Why is your .gitignore so big? Mine looks like this: I’m sorry, what I wrote didn’t make any sense. I mean that after I delete .gitignore then all the .o etc.. files that it was ignoring now come flooding back into the project and so they need to be deleted. My git client handles it well enough but the 20k+ files stall out the UI a little. ;)

You can delete the .gitignore from the repository, but keep it around as an uncommitted file in the branch you're preparing.

For example I myself don't commit my .gitignore, but simply have it lying around as untracked file.

Regards,
Sven

Reply by email

Marcos Douglas B. Santos
to Ryan Joseph: No, what I did was fork https://github.com/graemeg/freepascal and then a create new…
PM Ryan Joseph wrote 9 lines
> On Jul 20, 2019, at 4:02 PM, Martin Frb wrote: > > "origin/master" is the not modified trunk? No, what I did was fork https://github.com/graemeg/freepascal and then a create new feature branches based on master. “origin” I believe refers to my forked repo on GitHub and “upstream” is the original, i.e. https://github.com/graemeg/freepascal. So what I do when I want to keep up to date is "git pull upstream master” which updates my local “master” branch with changes from graemeg/freepascal. The problem I face now is how to get changes from master into my feature branch. Merging worked fine but then I face the problem of not being able to squash all commits before submitting patches. I’ve just learned now that rebase works BUT I need to squash commits first. Catch 22.

As you have "two master", which one is the original and other has your work, you might use:
git checkout master
git fetch upstream master
git rebase upstream/master

regards,
Marcos Douglas

Reply by email