Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

git commit history

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


ssastry at wikimedia

Jul 1, 2012, 5:30 PM

Post #1 of 5 (162 views)
Permalink
git commit history

One thing I just noticed when looking at the git history via gitk (on
Ubuntu) is that the history looks totally spaghetti and it is hard to
make sense of the history. This seems to have happened since the switch
to git and post-commit review workflow. It might be worth considering
this as well. git pull --rebase (which I assume is being used) usually
helps eliminate noisy merge commits, but I suspect something else is
going on -- post-review commit might be one reason. Is this something
that is worth fixing and can be fixed? Is there some gerrit config that
lets gerrit rebase before merge to let fast-forwarding and eliminate
noisy merges?

Subbu.

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


roan.kattouw at gmail

Jul 1, 2012, 10:14 PM

Post #2 of 5 (152 views)
Permalink
Re: git commit history [In reply to]

On Sun, Jul 1, 2012 at 5:30 PM, Subramanya Sastry <ssastry [at] wikimedia> wrote:
>
> One thing I just noticed when looking at the git history via gitk (on
> Ubuntu) is that the history looks totally spaghetti and it is hard to make
> sense of the history. This seems to have happened since the switch to git
> and post-commit review workflow. It might be worth considering this as
> well. git pull --rebase (which I assume is being used) usually helps
> eliminate noisy merge commits, but I suspect something else is going on --
> post-review commit might be one reason. Is this something that is worth
> fixing and can be fixed? Is there some gerrit config that lets gerrit
> rebase before merge to let fast-forwarding and eliminate noisy merges?
>
Yes, this can be configured in Gerrit on a per-repo basis. I seem to
recall we had a reason for not enabling this but I don't remember that
discussion very well or whether it took place at all.

Roan

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


krinklemail at gmail

Jul 2, 2012, 12:30 AM

Post #3 of 5 (153 views)
Permalink
Re: git commit history [In reply to]

On Jul 2, 2012, at 2:30 AM, Subramanya Sastry wrote:

>
> One thing I just noticed when looking at the git history via gitk (on Ubuntu) is that the history looks totally spaghetti and it is hard to make sense of the history. This seems to have happened since the switch to git and post-commit review workflow. It might be worth considering this as well. git pull --rebase (which I assume is being used) usually helps eliminate noisy merge commits, but I suspect something else is going on -- post-review commit might be one reason. Is this something that is worth fixing and can be fixed? Is there some gerrit config that lets gerrit rebase before merge to let fast-forwarding and eliminate noisy merges?
>
> Subbu.

Yep, this happens whenever a change is merged from the gerrit interface.

What we use locally to pull from gerrit doesn't influence the repository.

Also, one doesn't need `git pull --rebase` if you work in a topic branch instead of master (which everybody should). Other wise pulling from master mighit indeed cause a merge commit. But even then, git-review will warn when trying to push for review because it'll have to push 2 commits instead of one.

So best to always work in a topic branch, keep master clean, and do simple pulls from gerrit/master.

-- Krinkle


_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


hashar+wmf at free

Jul 7, 2012, 2:29 AM

Post #4 of 5 (144 views)
Permalink
Re: git commit history [In reply to]

Le 02/07/12 02:30, Subramanya Sastry a écrit :
>
> One thing I just noticed when looking at the git history via gitk (on
> Ubuntu) is that the history looks totally spaghetti and it is hard to
> make sense of the history. This seems to have happened since the switch
> to git and post-commit review workflow. It might be worth considering
> this as well.
<snip>

You can have git log ignore the merge commit by passing --no-merges.

We have deployed a new version of Gerrit that bring a [Rebase] button to
easily rebase a change before merging it. We could enforce fast-forward
on our repos but then we will also have to click that button every time :)


--
Antoine "hashar" Musso




_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Platonides at gmail

Jul 7, 2012, 10:56 AM

Post #5 of 5 (141 views)
Permalink
Re: git commit history [In reply to]

On 02/07/12 09:30, Krinkle wrote:
> Yep, this happens whenever a change is merged from the gerrit interface.
>
> What we use locally to pull from gerrit doesn't influence the repository.

> Also, one doesn't need `git pull --rebase` if you work in a topic branch
> instead of master (which everybody should). Other wise pulling from
> master mighit indeed cause a merge commit. But even then, git-review
> will warn when trying to push for review because it'll have to push 2
commits instead of one.

When I most find it annoying is when you're making a change on the tip.
Then you discover something minor to fix on the same file.
So you send two commits with the same parent and that will produce an
ugly merge, even though you don't really care about their order. Even
worse, you may need to make a topic branch merging both in order to
continue working.

(you _could_ send them as dependent changes, but at the cost of being
yelled by doing it that way)


Going back to the original issue about gitk, I'd like if there were an
option to view the changes produced in the first parent by the merge
(instead of empty file changes). Maybe someone knows an incantation for
that?



_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.