From: Weimin Pan <weimin.pan@oracle.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH5 PR gdb/16959] gdb hangs in infinite recursion
Date: Fri, 30 Mar 2018 22:39:00 -0000 [thread overview]
Message-ID: <337f2b1f-6fe8-07f3-f4cd-a9b5a3d5456d@oracle.com> (raw)
In-Reply-To: <3505af0b-d303-b556-0a4c-c416ac88a064@polymtl.ca>
On 3/30/2018 3:04 PM, Simon Marchi wrote:
> On 2018-03-30 05:43 PM, Weimin Pan wrote:
>> Hi Simon,
>>
>> I just got started to work on this. Here is what I've done (I followed
>> your lead to creat a different remote name):
>>
>> % git add <newfile>
>> % git commit -a
>> % git remote add upstream ssh://sourceware.org/git/binutils-gdb.git
>> % git fetch upstream
>>
>> I have a few questions:
>>
>> Â * Do I need to do a "git merge" after "git fetch"? Or can I just
>> Â Â do "git pull" which is equivalent to "git fetch;git merge"?
>> Â Â (I was a Mercurial(hg) user, its typical workflow is like:
>> Â Â Â hg in; do work; hg commit; hg pull; hg rebase(if needed); hg push)
> There are two different approaches to bringing the commits from upstream into the
> branch where you did some work, rebase and merge (they probably exist in mercurial
> too, maybe some other name). Many projects (including us) never use merging,
> because it leads to a non-linear history, which is more difficult to follow and
> bisect.
>
> To keep it simple, if you have some commits of yours on master and want to "update"
> to get the new stuff from the official repo, I suggest doing "git pull --rebase",
> which is the same as "git fetch; git rebase". It will basically try to apply your
> commits on top of the "official" master branch. You may need to handle any conflicts,
> I suggest looking on the web, there are plenty of tutorials for that.
Yes, there are indeed many tutorials out there and I've been reading
some of them to learn more
about git :)
>> Â * In your previous email, you said:
>>
>> Â Â Make sure you inserted the ChangeLog entries in the actual ChangeLog
>> files
>> Â Â and amended your commit
>>
>> Â Â It seems the "git commit -a" command will contain all the changes,
>> including
>> Â Â those in ChangeLog files. Why do I have to insert the entries?
> As you can see on the mailing list (though there are some variations), we usually
> put the ChangeLog entry as part of the commit message when posting the patch to
> the list. I think the historical reason for that is that otherwise, rebasing your
> patches always gives some conflicts in the ChangeLog files*. Therefore, when comes
> the time to push the patch to the upstream repo, we must not forget to actually
> insert the ChangeLog entry at the top of the right ChangeLog file, and modify the
> commit to contain that change. This can be done with
>
> $ ... copy ChangeLog entry to ChangeLog file ...
> $ git add ChangeLog
> $ git commit --amend
>
> The last command will modify the currently checked out commit with the stage changes.
Thanks for the tips. But I checked the ChangeLog files which seem to
contains the entries.
> * You can use this to mitigate the conflicts in ChangeLogs though:
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/git-merge-changelog.c
>
> I personally avoid using "git commit -a", as it's easy to add unwanted changes. You
> can try "git add -p" (with or without specifying a filename afteR). For each modified
> hunk, it will ask you if you want to add it to the staged changes (what's about to be
> committed). It's then easier to spot unintended changes.
Yes, it looks like "git add -p" is better than "commit -a" which our
group was told to use.
>> Â * Changing the commit title to be be more descriptive:
>>
>> Â Â So I need to use "git commit --amend" to change the title?
> Exactly, "git commit --amend" will allow you to change the commit message, including
> the title (the first line).
I just did my first patch:
$ git push upstream fixes
Enter passphrase for key '/home/wepan/.ssh/id_rsa':
Counting objects: 17, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 2.43 KiB, done.
Total 10 (delta 8), reused 0 (delta 0)
To ssh://sourceware.org/git/binutils-gdb.git
  0f59d5f..c9cf730 fixes -> fixes
and hope I did it correctly.
Thanks again for your help. I really appreciate it.
Weimin
> You are welcome, thanks for your perseverance!
>
> Simon
next prev parent reply other threads:[~2018-03-30 22:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 21:11 Weimin Pan
2018-03-30 5:09 ` Simon Marchi
2018-03-30 21:44 ` Weimin Pan
2018-03-30 22:05 ` Simon Marchi
2018-03-30 22:39 ` Weimin Pan [this message]
2018-03-30 22:52 ` Joel Brobecker
2018-03-30 23:32 ` Weimin Pan
2018-03-30 23:45 ` Joel Brobecker
2018-03-30 23:32 ` Weimin Pan
2018-03-30 23:41 ` Joel Brobecker
2018-03-31 0:31 ` Weimin Pan
2018-03-31 1:52 ` Joel Brobecker
2018-03-31 3:32 ` Wei-min Pan
2018-04-02 13:44 ` Joel Brobecker
2018-04-02 17:27 ` Wei-min Pan
2018-04-02 17:53 ` Joel Brobecker
2018-04-02 19:28 ` [pushed][PATCH5 " Weimin Pan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=337f2b1f-6fe8-07f3-f4cd-a9b5a3d5456d@oracle.com \
--to=weimin.pan@oracle.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox