Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-13 Thread grischka

Pursuer wrote:

Thanks a lot for your rearranging and advice.

by the way I'm sure I only add tcc.h to the commit "misplaced parenthese
around...", So I'm also confused about the side-effect mentioned
by Christian Jullien. (In fact I had cloned a new copy before
rearranging, In which the additions made by Kyryl on 22_floating_point.c
was not removed.)


There is no difference whatsoever codewise between my push -f
and the mob head before. Can be seen with

$ git diff old-mob mob

In case old-mob can be restored (if you had it already) like

$ git checkout -b old-mob 8a1ad66f0529bcd71bd1552178653374ce7f6c11

or even still fetched from repo like

$ git fetch origin 8a1ad66f0529bcd71bd1552178653374ce7f6c11:old-mob

(Maybe for 30 days or so until it will disappear)

So it were just Pursuer's private merges which I removed from history
(and which we aren't really interested to know).

Maybe if from the merged branch one checks out the state at Pursuer's
patch directly then in fact the code does not contain Kyryl's patch
although in an one-dimensional listing for example (such as the web
git-web) Pursuer's patch would appear later, from its date.

-- gr

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-12 Thread Alexander Strasser
Hi!

On 2020-09-12 21:50 +0800, Pursuer wrote:
> Thanks a lot for your rearranging and advice.

IMHO your first message in this thread was a bit short. E.g.
some people (like me initially) thought, you only might have
a local problem.


> by the way I'm sure I only add tcc.h to the commit "misplaced parenthese 
> around...", So I'm also confused about the side-effect mentioned 
> by Christian Jullien. (In fact I had cloned a new copy before 
> rearranging, In which the additions made by Kyryl on 22_floating_point.c 
> was not removed.)

No idea, what went wrong an why.

Though Git is often not very intuitive, it usually provides all the
tools to let you check what would happen.

Some things that might prevent mistakes like that in future.

Before pushing:

git push --dry-run
# Sharply look at the output, what branches, tags would be pushed?
#
# Assuming you want to only push one branch, make sure it's only
# the one branch that will be pushed to the correct remote repo.
#
# Copy the commit range displayed for that branch.

git log --reverse --oneline COMMIT_RANGE_FROM_DRY_RUN
# commits (oldest to youngest) that will be pushed

git diff --stat --patch COMMIT_RANGE_FROM_DRY_RUN
# check the stats and have a quick look over the changed lines

If something comes up above: Investigate, fix and start over.

Once everything looks fine: Push.


Best regards,
  Alexander


> -- Original --
> From: 
>"tinycc-devel" 
>
>  Date: Sat, Sep 12, 2020 01:54 PM
> To: "tinycc-devel"
> Subject: Re: [Tinycc-devel] It seem I pull code in wrong way. How can I 
> revert it?
>
>
>
> avih via Tinycc-devel wrote:
> >
> > While force-pushing is usually possible, I'd argue that at the tcc repo
> > (and generally elsewhere too, but to each his own practices) no one
> > should force push except maybe maintainers and maybe other regular
> > contributors which 100% know what they're doing when force-pushing.
>
> So I did put on my "maintainer hat" in this case.
>
> Pursuer2's patch "misplaced parenthese around ..." is now on top of
> mob as it was before his pushes.  Kyryl's patch "fix float to u64..."
> still has bugs (<< vs >>) and adds bad formatting unnecessarily.
>
> To all:
>
> In the future, please use git cherry-pick or git rebase to put
> your patches on top of the current public mob branch, first.
>
> And as always:
> * test before you push.
>
> * don't add tabs and use 4 spaces to indent.  (Don't use emacs or
>    configure appropriately its automatisms.).
>
> * don't change lines that you did not change.
>
> Thanks,
>
> --- gr
>
> >
> > I.e. if you want something reverted at the mob repo, please ask here
> > at the mailing list and one of the regulars will judge how to handle
> > the request, IMHO.
> >
> > - avih

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-12 Thread Steffen Nurpmeso
Pursuer wrote in
 :
 |Thanks a lot for your rearranging and advice.
 |
 |by the way I'm sure I only add tcc.h to the commit "misplaced \
 |parenthese around...", So I'm also confused about the side-effect mentio\
 |ned by Christian Jullien. (In fact I had cloned a new copy before \
 |rearranging, In which the additions made by Kyryl on 22_floating_po\
 |int.c was not removed.)

You do not need to reclone a repository normally, there are
a couple of ways to reset your own branches to the origin that is
stored in the database.
That is to say, do not overcomplicate it, these are just commits
stacking upon each other from toe to tip, and the tip is mob here.
You can plug and play them around and stick together almost at
will.  (Almost because the very first commit of a branch is not so
easy.)

  git checkout -B mob origin/mob

Checks out to local branch mob, resetting it first as necessary,
and lets it track themob branch of the upstream "origin".

  git update-ref refs/heads/mob origin/mob

Should just make the reference "mob" re-point to something.
Note you really need refs/heads/, because git lets "you go
outside" too, which can be surprising.

  git reset -q --hard origin/mob

Is also an idea.  But i would recommend the first.
You can see all the tips mentioned above like that

  git log --color=auto --no-walk --decorate --oneline --branches --remotes

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-12 Thread Pursuer
Thanks a lot for your rearranging and advice.


by the way I'm sure I only add tcc.h to the commit "misplaced parenthese 
around...", So I'm also confused about the side-effect mentioned 
by Christian Jullien. (In fact I had cloned a new copy before rearranging, 
In which the additions made by Kyryl on 22_floating_point.c was not 
removed.)






-- Original --
From:   
 "tinycc-devel" 
   
https://lists.nongnu.org/mailman/listinfo/tinycc-devel___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-12 Thread avih via Tinycc-devel
 You already quoted the reply, but in order of descending precedence:

- 4 spaces is the preferred style with new files or new functions.

- Keep the style of the current file if it's obvious (fully/mostly tabs
 or fully/mostly N spaces).

- If a file is mixed style already, do your best effort to keep the
 code which you touch in the same style as the immediate surrounding
 code, with some bias towards 4 spaces.

avih
 On Saturday, September 12, 2020, 04:06:38 PM GMT+3, Kyryl Melekhin 
 wrote:  
 
 What I mean is, just look at this : https://ibb.co/VWzGSt3

сб, 12 сент. 2020 г. в 08:44, Kyryl Melekhin :
>
> About formatting, what's the preferred vim setting you use? I looked
> through the code and couldn't figure out what it was, it seemed so
> inconsistent so I just thought you guys don't care about that.
>
> сб, 12 сент. 2020 г. в 05:55, grischka :
> >
> > avih via Tinycc-devel wrote:
> > >
> > > While force-pushing is usually possible, I'd argue that at the tcc repo
> > > (and generally elsewhere too, but to each his own practices) no one
> > > should force push except maybe maintainers and maybe other regular
> > > contributors which 100% know what they're doing when force-pushing.
> >
> > So I did put on my "maintainer hat" in this case.
> >
> > Pursuer2's patch "misplaced parenthese around ..." is now on top of
> > mob as it was before his pushes.  Kyryl's patch "fix float to u64..."
> > still has bugs (<< vs >>) and adds bad formatting unnecessarily.
> >
> > To all:
> >
> > In the future, please use git cherry-pick or git rebase to put
> > your patches on top of the current public mob branch, first.
> >
> > And as always:
> > * test before you push.
> >
> > * don't add tabs and use 4 spaces to indent.  (Don't use emacs or
> >    configure appropriately its automatisms.).
> >
> > * don't change lines that you did not change.
> >
> > Thanks,
> >
> > --- gr
> >
> > >
> > > I.e. if you want something reverted at the mob repo, please ask here
> > > at the mailing list and one of the regulars will judge how to handle
> > > the request, IMHO.
> > >
> > > - avih
> >
> > ___
> > Tinycc-devel mailing list
> > Tinycc-devel@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/tinycc-devel

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
  ___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-12 Thread Kyryl Melekhin
What I mean is, just look at this : https://ibb.co/VWzGSt3

сб, 12 сент. 2020 г. в 08:44, Kyryl Melekhin :
>
> About formatting, what's the preferred vim setting you use? I looked
> through the code and couldn't figure out what it was, it seemed so
> inconsistent so I just thought you guys don't care about that.
>
> сб, 12 сент. 2020 г. в 05:55, grischka :
> >
> > avih via Tinycc-devel wrote:
> > >
> > > While force-pushing is usually possible, I'd argue that at the tcc repo
> > > (and generally elsewhere too, but to each his own practices) no one
> > > should force push except maybe maintainers and maybe other regular
> > > contributors which 100% know what they're doing when force-pushing.
> >
> > So I did put on my "maintainer hat" in this case.
> >
> > Pursuer2's patch "misplaced parenthese around ..." is now on top of
> > mob as it was before his pushes.  Kyryl's patch "fix float to u64..."
> > still has bugs (<< vs >>) and adds bad formatting unnecessarily.
> >
> > To all:
> >
> > In the future, please use git cherry-pick or git rebase to put
> > your patches on top of the current public mob branch, first.
> >
> > And as always:
> > * test before you push.
> >
> > * don't add tabs and use 4 spaces to indent.  (Don't use emacs or
> >configure appropriately its automatisms.).
> >
> > * don't change lines that you did not change.
> >
> > Thanks,
> >
> > --- gr
> >
> > >
> > > I.e. if you want something reverted at the mob repo, please ask here
> > > at the mailing list and one of the regulars will judge how to handle
> > > the request, IMHO.
> > >
> > > - avih
> >
> > ___
> > Tinycc-devel mailing list
> > Tinycc-devel@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/tinycc-devel

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-12 Thread Kyryl Melekhin
About formatting, what's the preferred vim setting you use? I looked
through the code and couldn't figure out what it was, it seemed so
inconsistent so I just thought you guys don't care about that.

сб, 12 сент. 2020 г. в 05:55, grischka :
>
> avih via Tinycc-devel wrote:
> >
> > While force-pushing is usually possible, I'd argue that at the tcc repo
> > (and generally elsewhere too, but to each his own practices) no one
> > should force push except maybe maintainers and maybe other regular
> > contributors which 100% know what they're doing when force-pushing.
>
> So I did put on my "maintainer hat" in this case.
>
> Pursuer2's patch "misplaced parenthese around ..." is now on top of
> mob as it was before his pushes.  Kyryl's patch "fix float to u64..."
> still has bugs (<< vs >>) and adds bad formatting unnecessarily.
>
> To all:
>
> In the future, please use git cherry-pick or git rebase to put
> your patches on top of the current public mob branch, first.
>
> And as always:
> * test before you push.
>
> * don't add tabs and use 4 spaces to indent.  (Don't use emacs or
>configure appropriately its automatisms.).
>
> * don't change lines that you did not change.
>
> Thanks,
>
> --- gr
>
> >
> > I.e. if you want something reverted at the mob repo, please ask here
> > at the mailing list and one of the regulars will judge how to handle
> > the request, IMHO.
> >
> > - avih
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-11 Thread grischka

avih via Tinycc-devel wrote:


While force-pushing is usually possible, I'd argue that at the tcc repo
(and generally elsewhere too, but to each his own practices) no one
should force push except maybe maintainers and maybe other regular
contributors which 100% know what they're doing when force-pushing.


So I did put on my "maintainer hat" in this case.

Pursuer2's patch "misplaced parenthese around ..." is now on top of
mob as it was before his pushes.  Kyryl's patch "fix float to u64..."
still has bugs (<< vs >>) and adds bad formatting unnecessarily.

To all:

In the future, please use git cherry-pick or git rebase to put
your patches on top of the current public mob branch, first.

And as always:
* test before you push.

* don't add tabs and use 4 spaces to indent.  (Don't use emacs or
  configure appropriately its automatisms.).

* don't change lines that you did not change.

Thanks,

--- gr



I.e. if you want something reverted at the mob repo, please ask here
at the mailing list and one of the regulars will judge how to handle
the request, IMHO.

- avih


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-11 Thread avih via Tinycc-devel
 
While force-pushing is usually possible, I'd argue that at the tcc repo
(and generally elsewhere too, but to each his own practices) no one
should force push except maybe maintainers and maybe other regular
contributors which 100% know what they're doing when force-pushing.

I.e. if you want something reverted at the mob repo, please ask here
at the mailing list and one of the regulars will judge how to handle
the request, IMHO.

- avih

 On Friday, September 11, 2020, 09:29:29 PM GMT+3, Patrick Hammer 
 wrote:  
 
 Hi!
Force pushing is dangerous, make sure to have a copy of the repo backed 
up!Sometimes it's necessary though. If you need to do it, make sure that each 
developer re-clones the repository!I had to do it yesterday for 
https://github.com/opennars/opennars-for-applicationsas one author pushed with 
a wrong email address, and this demands a rebase&amend, which changes all 
commit hashes beginning from the edited commit.

Best regards,Patrick

Am Fr., 11. Sept. 2020 um 17:25 Uhr schrieb Pursuer <1596067...@qq.com>:

I found a way to remove these empty commit, by use "git rebase -i".  But I 
can't push these change without -f flag, and I have been told that do NOT use 
"git push -f". So I can only give up to revert it.

-- Original --From: "tinycc-devel" 
;Date: Fri, Sep 11, 2020 11:35 PMTo: 
"tinycc-devel";Cc: "Larry 
Doolittle";Subject: Re: [Tinycc-devel] It seem I pull 
code in wrong way. How can I revert it?
Pursuer -

On Fri, Sep 11, 2020 at 11:27:05PM +0800, Pursuer wrote:
> I'm sorry that I pull code in wrong way. 
> And now there are many commit like 
> Merge branch 'mob' of git://repo.or.cz/tinycc into mob
> How can I remove them.

Obligatory xkcd:
https://xkcd.com/1597/

There are fancier (and arguably more efficient) ways to recover than
"delete the project, and download a fresh copy".
But they're harder to explain and understand.

  - Larry

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
  ___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-11 Thread Patrick Hammer
Hi!

Force pushing is dangerous, make sure to have a copy of the repo backed up!
Sometimes it's necessary though. If you need to do it, make sure that each
developer re-clones the repository!
I had to do it yesterday for
https://github.com/opennars/opennars-for-applications
as one author pushed with a wrong email address, and this demands a
rebase&amend, which changes all commit hashes beginning from the edited
commit.

Best regards,
Patrick

Am Fr., 11. Sept. 2020 um 17:25 Uhr schrieb Pursuer <1596067...@qq.com>:

> I found a way to remove these empty commit, by use "git rebase -i".  But I
> can't push these change without -f flag, and I have been told that do NOT
> use "git push -f". So I can only give up to revert it.
>
>
> -- Original --
> *From:* "tinycc-devel" ;
> *Date:* Fri, Sep 11, 2020 11:35 PM
> *To:* "tinycc-devel";
> *Cc:* "Larry Doolittle";
> *Subject:* Re: [Tinycc-devel] It seem I pull code in wrong way. How can I
> revert it?
>
> Pursuer -
>
> On Fri, Sep 11, 2020 at 11:27:05PM +0800, Pursuer wrote:
> > I'm sorry that I pull code in wrong way. 
> > And now there are many commit like 
> > Merge branch 'mob' of git://repo.or.cz/tinycc into mob
> > How can I remove them.
>
> Obligatory xkcd:
> https://xkcd.com/1597/
>
> There are fancier (and arguably more efficient) ways to recover than
> "delete the project, and download a fresh copy".
> But they're harder to explain and understand.
>
>   - Larry
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-11 Thread Pursuer
I found a way to remove these empty commit, by use "git rebase -i".  But I 
can't push these change without -f flag, and I have been told that do NOT use 
"git push -f". So I can only give up to revert it.





-- Original --
From:   
 "tinycc-devel" 
   
https://xkcd.com/1597/

There are fancier (and arguably more efficient) ways to recover than
"delete the project, and download a fresh copy".
But they're harder to explain and understand.

  - Larry

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-11 Thread Larry Doolittle via Tinycc-devel
Pursuer -

On Fri, Sep 11, 2020 at 11:27:05PM +0800, Pursuer wrote:
> I'm sorry that I pull code in wrong way. 
> And now there are many commit like 
>   Merge branch 'mob' of git://repo.or.cz/tinycc into mob
> How can I remove them.

Obligatory xkcd:
https://xkcd.com/1597/

There are fancier (and arguably more efficient) ways to recover than
"delete the project, and download a fresh copy".
But they're harder to explain and understand.

  - Larry

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] It seem I pull code in wrong way. How can I revert it?

2020-09-11 Thread Pursuer
I'm sorry that I pull code in wrong way. 
And now there are many commit like 


Merge branch 'mob' of git://repo.or.cz/tinycc into mob


How can I remove them.___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel