This is the mail archive of the
mailing list for the GCC project.
Re: Fixing gcc git logs
- From: Richard Earnshaw <Richard dot Earnshaw at foss dot arm dot com>
- To: Jerry <jvdelisle at charter dot net>, gcc at gcc dot gnu dot org
- Date: Thu, 2 Jan 2020 10:49:45 +0000
- Subject: Re: Fixing gcc git logs
- References: <firstname.lastname@example.org>
On 02/01/2020 02:00, Jerry wrote:
> In the following git log entry, I made a typo on the PR number in the
> libgfortran ChangeLog file. I noticed this right after the git commit,
> while editing the git log.
> So I quit the edit without saving and git reported that the commit was
> Then I edited the my local ChangeLog file, did git add . and git commit
> again. In this case the git log edit started as usual and I recopied
> the correct text into my editor (VI) and saved it. The commit proceeded
> as I expected. Then I did the git svn dcommit
> Well the git log ended up like this. How to fix? How to avoid?
> The 90274 should have been 90374. The actual committed files are OK.
If you've not pushed the commit you have two options.
If it's the head revision, you can use
git commit --amend
If it's earlier in your local history, you can use
git rebase -i
and then use (I think) 'reword' to reword the commit log for that commit.
If you've pushed the branch to a public tree then it might be too late,
depending on the push policy for branches (in gcc trunk we will not
permit rewriting history in that way because it breaks other users
trying to pull). Some more private branches might permit such rewriting
> commit 86e1d9f75bae096922664755d037f2a9d85e2a24 (HEAD -> trunk,
> svn/trunk, origin/trunk, origin/master)
> Author: jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date: Thu Jan 2 00:57:31 2020 +0000
> PR 90374 d0.d, e0.d, es0.d, en0.d, g0.d and ew.d edit descriptors.
> PR libfortran/90274
> * io/format.c (parse_format_list): Implement the E0 exponent
> width to provide smallest possible width for exponent fields.
> Refactor code for correct parsing and better readability of the
> * io/io.h (write_real_w0): Change interface to pass in pointer
> to fnode.
> * io/transfer.c: Update all calls to write_real_w0 to use the
> new interface.
> * io/write.c ((write_real_w0): Use the new interface with fnode
> to access both the decimal precision and exponent widths
> used in
> * io/write_float.def (build_float_string): Use the passed in
> exponent width to calculate the used width in the case of E0.
> git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@279828