public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Question on push
@ 2021-01-15 22:36 Jerry DeLisle
  2021-01-16 10:23 ` Thomas Koenig
  2021-01-16 13:00 ` Tobias Burnus
  0 siblings, 2 replies; 3+ messages in thread
From: Jerry DeLisle @ 2021-01-15 22:36 UTC (permalink / raw)
  To: fortran

Hi all,

I managed to push Harris patch regarding the ISO_Fortran_binding.c. 
However it was a struggle.

Naturally the push was rejected several times.  As I was trying to 
interpret the reasons given and go back and read the instructions, I was 
given the impression that the behind the scenes process would ammend the 
actual ChangeLog files for you.  I have not seen this happen so to 
clarify, There are two ChangeLog files involved. gcc/testsuite/ChangeLog 
and libgfortran/ChangeLog.

Do I make those changes locally and commit them?  (as I know we use to do!)

I also managed to forget to --author Harris on the push that went 
through (In spite of Tobias reminding me to do so).  I was looking at 
--amend and as far as I can tell, I can only change the tip of my local 
repository before the push.  Is there a way to fix that out on the master?

Sorry for the trouble,

Jerry



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question on push
  2021-01-15 22:36 Question on push Jerry DeLisle
@ 2021-01-16 10:23 ` Thomas Koenig
  2021-01-16 13:00 ` Tobias Burnus
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Koenig @ 2021-01-16 10:23 UTC (permalink / raw)
  To: Jerry DeLisle, fortran

Hi Jerry,

> I managed to push Harris patch regarding the ISO_Fortran_binding.c. 
> However it was a struggle.
> 
> Naturally the push was rejected several times.

Yes, the workflow that is not enforced by the scripts is really bad.
There are a couple of things that you can to in advance, to save
some of the pain.

First, if you haven't already done so, run

$ contrib/gcc-git-customization.sh

This will set up a few useful aliases.

Once you have done that, you have access to the command

$ git gcc-verify

which will do the checking locally.

> As I was trying to 
> interpret the reasons given and go back and read the instructions, I was 
> given the impression that the behind the scenes process would ammend the 
> actual ChangeLog files for you.

That is correct.

The idea is to put the ChangeLog stuff into the commit message and
it will then automagically be added to the ChangeLog files at a
later date.

> I have not seen this happen so to 
> clarify, There are two ChangeLog files involved. gcc/testsuite/ChangeLog 
> and libgfortran/ChangeLog.
> 
> Do I make those changes locally and commit them?  (as I know we use to do!)

The way that works for me is:

(Change whatever I want to change)
Change to the basic source directory of gcc
git add .    # Add all the changes
git diff --cached    # Is this really what I meant to do?
git diff --cached > /tmp/p.txt   # Create the patch
git diff --cached | contrib/mklog.py > /tmp/ChangeLog # template
emacs /tmp/ChangeLog  # Edit the ChangeLog to say what it should say
git commit

I then insert /tmp/ChangeLog into the commit message

git diff HEAD^1  # Check again

git push



> I also managed to forget to --author Harris on the push that went 
> through (In spite of Tobias reminding me to do so).  I was looking at 
> --amend and as far as I can tell, I can only change the tip of my local 
> repository before the push.  Is there a way to fix that out on the master?

I think this is not possible. You can edit the ChangeLog afterwards
(I don't know when the change is propagated there).

When backporting (using

git gcc-backport

) you can of course then use --amend to change things.  (For this patch,
it probably makes sense to backport).

Hope this helps somewhat.

Best regards

	Thomas


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question on push
  2021-01-15 22:36 Question on push Jerry DeLisle
  2021-01-16 10:23 ` Thomas Koenig
@ 2021-01-16 13:00 ` Tobias Burnus
  1 sibling, 0 replies; 3+ messages in thread
From: Tobias Burnus @ 2021-01-16 13:00 UTC (permalink / raw)
  To: Jerry DeLisle, fortran

Hi Jerry,

yes, ChangeLog files are automatically generated from the commit log by 
the contrib/gcc-changelog/. If the generated changelog file is wrong 
because the script mishandled something, that script should be fixed.

In any case, if the ChangeLog file is wrong, you have to wait until the 
nightly script has run (which also bumps the gcc/DATESTAMP) and then you 
can fix the ChangeLog files and commit them.

Tobias

PS: Your commit also missed the PR in the commit.

PPS: If you backport something, use 'git cherry-pick -x', which also 
will handle the backported information in the changelog.

On 15.01.21 23:36, Jerry DeLisle wrote:
> Naturally the push was rejected several times.  As I was trying to 
> interpret the reasons given and go back and read the instructions, I 
> was given the impression that the behind the scenes process would 
> ammend the actual ChangeLog files for you.  I have not seen this 
> happen so to clarify, There are two ChangeLog files involved. 
> gcc/testsuite/ChangeLog and libgfortran/ChangeLog. 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-16 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 22:36 Question on push Jerry DeLisle
2021-01-16 10:23 ` Thomas Koenig
2021-01-16 13:00 ` Tobias Burnus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).