Re: [AMBER-Developers] git logs and squashing commits

From: Gerald Monard <Gerald.Monard.univ-lorraine.fr>
Date: Wed, 24 Feb 2016 21:12:17 +0100

On 02/24/2016 08:32 PM, Hai Nguyen wrote:
> hi,
>
> We only squash commits for cpptraj, pytraj and parmed when pulling commits
> from github repos. Last year pytraj has > 1000 commits, cpptraj > 1000
> commits, parmed > 1000 commits . If not squashing to few big commits, amber
> git log will be populated and even more difficult to debug other programs.
>

No, since here the "problem" reported by Dave was to check doc/amber.bib
which has been changed inside a squashed commit. doc/amber.bib is not
part of cpptraj, pytraj, nor parmed.

> So if anyone wants to 'git blame', ... any files in those packages, he/she
> should check corresponding github repo https://github.com/Amber-MD
>
> For other programs, nothing change (I just tested '*git log --color
> mkrelease_at*')

"git log doc/amber.bib" as said by Dave reports hundreds of
"sub-commits" and it is difficult to see which of these sub-commits is
at the origin of the change. I here used "git blame" to check which
commit git refers to and it refers to the "main one" (i.e., the squash
one) and not one of the sub-commits. I do think that it does pollute the
answer.

Best,

Gerald.

>
> Hai
>
> On Wed, Feb 24, 2016 at 2:12 PM, Gerald Monard <
> Gerald.Monard.univ-lorraine.fr> wrote:
>
>> Hi,
>>
>> This problem was already raised a couple of weeks ago by Ross: by using
>> squash commits, git sees only one total commit. If you run "git blame
>> amber.bib", then you will see the commit md5sum of this squashed commit
>> and not an individual one inside the squashed commit. This means that
>> the change of one individual file is related to a sum of changes. Thus
>> if one wants more details about that commit (with its title and log),
>> then the only thing you get is a big log with potentially hundreds of
>> changes and files involved. It's then difficult to understand what's
>> going on there.
>>
>> Best,
>>
>> Gerald.
>>
>> On 02/24/2016 07:41 PM, Hai Nguyen wrote:
>>> alternatively,
>>>
>>> you can try
>>>
>>> type*: git log --color -p amber.bib*
>>> then search keyword amber.bib by typing:* /amber.bib*
>>> to repeat the search, press* 'n'*
>>> (similar to vim)
>>>
>>> tag "*-p*" will show the modified content
>>>
>>> Hai
>>>
>>> On Wed, Feb 24, 2016 at 12:31 PM, Timothy J Giese <
>> timothyjgiese.gmail.com>
>>> wrote:
>>>
>>>> There is a gui called "gitk" that is sometimes useful.
>>>>
>>>> Open gitk, then
>>>> next to "Find",
>>>> select "touching paths:"
>>>> and then enter the name of the file;
>>>> e.g., AmberTools/src/sander/multisander.F90
>>>>
>>>> Then the arrow buttons next to "Find" will skip up and down through
>>>> those commits that edit that file.
>>>>
>>>> -Tim
>>>>
>>>> On 02/24/2016 12:22 PM, David A Case wrote:
>>>>> I'm pinging git experts about what (if anything) we can do with the
>>>> following
>>>>> problem:
>>>>>
>>>>> If I cd to the amber14/doc directory and type "git log amber.bib" (in
>>>> order
>>>>> to find recent changes to this file), I get the following:
>>>>>
>>>>> commit acc59a342da64bf949ac6828b45294b275970344
>>>>> Author: Hai Nguyen <hainm.comp.gmail.com>
>>>>> Date: Thu Feb 4 11:02:31 2016 -0500
>>>>>
>>>>> Squashed commit of the following:
>>>>>
>>>>> commit 689f1f003ea81f51a26f4791e46ed9fa18ee8b5e
>>>>> Merge: 8a40ed6 9c3c6ef
>>>>> Author: Hai Nguyen <hainm.users.noreply.github.com>
>>>>> Date: Thu Feb 4 01:50:52 2016 -0500
>>>>>
>>>>> Merge pull request #1136 from hainm/master
>>>>>
>>>>> add ref_mask for rmsd
>>>>>
>>>>> commit 9c3c6ef39bd1c4a45308733b54439dde4d7f3edf
>>>>> Author: Hai Nguyen <hainm.comp.gmail.com>
>>>>> Date: Thu Feb 4 01:40:16 2016 -0500
>>>>>
>>>>> fix
>>>>>
>>>>>
>>>>> ...etc...etc for hundreds of commit logs, (7500 lines of text) almost
>>>> none
>>>>> of which actually did anything to amber.bib itself.
>>>>>
>>>>> I can redirect the output to a file, and use a text editor to try to
>> find
>>>>> what I'm looking for, but I wonder if there is not a better way. Do we
>>>> really
>>>>> need commits that are thousands of lines long? Is there a better way
>> to
>>>>> maintain a useful history? Some fancy option to the "git log" command
>>>> that
>>>>> alleviates this?
>>>>>
>>>>> ...thx...dac
>>>>>
>>>>> _______________________________________________
>>>>> AMBER-Developers mailing list
>>>>> AMBER-Developers.ambermd.org
>>>>> http://lists.ambermd.org/mailman/listinfo/amber-developers
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> AMBER-Developers mailing list
>>>> AMBER-Developers.ambermd.org
>>>> http://lists.ambermd.org/mailman/listinfo/amber-developers
>>>>
>>> _______________________________________________
>>> AMBER-Developers mailing list
>>> AMBER-Developers.ambermd.org
>>> http://lists.ambermd.org/mailman/listinfo/amber-developers
>>>
>>
>> --
>>
>> ____________________________________________________________________________
>>
>> Prof. Gerald MONARD
>> SRSMC, Université de Lorraine, CNRS
>> Boulevard des Aiguillettes B.P. 70239
>> F-54506 Vandoeuvre-les-Nancy, FRANCE
>>
>> e-mail : Gerald.Monard.univ-lorraine.fr
>> tel. : +33 (0)383.684.381
>> fax : +33 (0)383.684.371
>> web : http://www.monard.info
>>
>>
>> ____________________________________________________________________________
>>
>>
>> _______________________________________________
>> AMBER-Developers mailing list
>> AMBER-Developers.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber-developers
>>
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
>

-- 
____________________________________________________________________________
  Prof. Gerald MONARD
  SRSMC, Université de Lorraine, CNRS
  Boulevard des Aiguillettes B.P. 70239
  F-54506 Vandoeuvre-les-Nancy, FRANCE
  e-mail : Gerald.Monard.univ-lorraine.fr
  tel.   : +33 (0)383.684.381
  fax    : +33 (0)383.684.371
  web    : http://www.monard.info
____________________________________________________________________________
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Feb 24 2016 - 12:30:03 PST
Custom Search