Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 568890 - sys-apps/portage-2.2.26: "emaint sync" ignoring "sync-depth = 1" for git pull?
Summary: sys-apps/portage-2.2.26: "emaint sync" ignoring "sync-depth = 1" for git pull?
Status: RESOLVED DUPLICATE of bug 552814
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-20 16:57 UTC by Sebastian Pipping
Modified: 2016-01-03 16:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Pipping gentoo-dev 2015-12-20 16:57:12 UTC
Hi!

<man 5 portage> documents sync-depth to default to "1 (only the newest commit)".  Nevertheless, "emaint sync" seems to call "/usr/bin/git pull" without "--depth 1" while pull does support that option, too.  Is that intended or is that just left to do?

Thanks and best, Sebastian
Comment 1 Zac Medico gentoo-dev 2015-12-21 03:53:34 UTC
(In reply to Sebastian Pipping from comment #0)
> <man 5 portage> documents sync-depth to default to "1 (only the newest
> commit)".  Nevertheless, "emaint sync" seems to call "/usr/bin/git pull"
> without "--depth 1" while pull does support that option, too.  Is that
> intended or is that just left to do?

Have you ever tried doing a `git pull --depth=1` on the gentoo repo? I tried with git-2.4.10, and the default merge strategy reported conflicts for all of the updated Manifest files. However, `git fetch --depth=1` followed by `git reset --hard origin/master` works.
Comment 2 Zac Medico gentoo-dev 2015-12-21 04:10:08 UTC
(In reply to Zac Medico from comment #1)
> However, `git fetch --depth=1` followed by `git reset --hard origin/master` works.

Note that `git reset --hard origin/master` will reset all of the file timestamps, which will be an issue for people relying on the default flat_hash cache since it uses timestamps for cache validation. We should change it to use md5 like the cache that egencache generates (bug 568934 filed).
Comment 3 Sebastian Pipping gentoo-dev 2016-01-03 16:30:56 UTC
(In reply to Zac Medico from comment #1)
> Have you ever tried doing a `git pull --depth=1` on the gentoo repo? I tried
> with git-2.4.10, and the default merge strategy reported conflicts for all
> of the updated Manifest files.

I have seen it some time myself by now, yes.  I guess it's no option then.


> However, `git fetch --depth=1` followed by
> `git reset --hard origin/master` works.

It would keep more history though, if I am not mistaken.
Comment 4 Brian Dolbec gentoo-dev 2016-01-03 16:58:58 UTC

*** This bug has been marked as a duplicate of bug 552814 ***