git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-push sent too many objects

From
Shawn Pearce <spearce@spearce.org>
Date
Apr 18, 2012, 07:59 UTC
Message-ID
<CAJo=hJuGHymJtZL14mAq0gBZE+za5URoon=rMzPA=tTQC14ftQ@mail.gmail.com>
In-Reply-To
<30586.1334681607@plover.com>
On Tue, Apr 17, 2012 at 09:53, Mark Jason Dominus <mjd@plover.com> wrote:
Show 18 quoted lines
>
> I had a master ref, pointing to commit 231e284, which I branched to
> make a "coupon" ref.  My remote, "origin" had a copy of commit
> 231e284.
>
> I modified one file and committed it on "coupon", yielding commit
> 03b6489. Then I pushed coupon to origin.  I expected that git-push
> would send about five objects, but instead it reported sending 1,315.
>
> Command output is pasted at http://nopaste.info/a866bb00e0.html .
> You can verify that:
>
> 1. I pushed only coupon, not any other ref.
> 2. origin already had a copy of coupon's predecessor commit, 231e284.
> 3. 03b6489 was identical to 231e284 except for changes in one file.
> 4. I was not doing anything obviously strange.
>
> What happened here?  Why did git-push send 1,315 objects instead of 5?
Is it possible someone else modified the repository at the same time?

We see this happen when the remote no longer has a branch pointing exactly at commit 231e284, because another user (or you in another shell?) had pushed a new commit to that branch before you pushed this new coupon branch. In these sorts of cases your Git client can't accurately determine what the server has and does not have, so it errs on the conservative side and sends a lot more than it probably needed to.

Previous: Mark Jason DominusNext: Mark Jason Dominus
Message 2 of 5 in “git-push sent too many objects”
  1. Mark Jason DominusApr 17, 2012
  2. Shawn PearceApr 18, 2012
  3. Mark Jason DominusApr 18, 2012
  4. Jeff KingApr 26, 2012
  5. Mark Jason DominusApr 27, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.