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

Re: Avoiding broken Gitweb links and deleted objects

From
William Swanson <swansontec@gmail.com>
Date
May 22, 2013, 15:41 UTC
Message-ID
<CABjHNoQEpjE8Da2qiU8o5LRWs7CrUW44XcV7T=tcnB_Z1z+Uvg@mail.gmail.com>
In-Reply-To
<CAJELnLEGr7eG9W2WvcVjWi7rT6EUhBDVdtfx6Xjp15duB0E9kw@mail.gmail.com>
On Wed, May 22, 2013 at 6:32 AM, Matt McClure <matthewlmcclure@gmail.com> wrote:
> Is there a way to push/pull reflogs among different repositories?
Not that I am aware of, at least not in core git.
Show 11 quoted lines
> In my original scenario:
>
> 1. the commits are created on a developer machine
> 2. pushed to a central origin repository running Gitweb
> 3. the branch is rebased on the developer machine
> 4. the branch is push --force'd to the origin
>
> Later, git push tells me:
>
>     warning: There are too many unreachable loose objects; run 'git
> prune' to remove them.

You don't need to share reflogs in this case. Assuming the server were to keep logs of its own, the forced update would create a new reflog entry showing something like "<old-sha> <new-shaw> <date info> Forced push", so the pre-rebase version would still be reachable from the reflogs, keeping it around.

> or I want to delete old topic branch HEADs to improve performance.
>
> But I never want to let Git delete the underlying commit objects since
> there could be Gitweb links pointing at them.

The reflog thing won't help you in this case, since reflogs are deleted when their branches are deleted. it sounds like you never want to delete anything, so it would make more sense to just disable garbage collection entirely.

-William
Previous: Matt McClure
Message 14 of 14 in “Avoiding broken Gitweb links and deleted objects”
  1. Matt McClureMay 8, 2013
  2. Matt McClureMay 9, 2013
  3. Johannes SixtMay 10, 2013
  4. Junio C HamanoMay 10, 2013
  5. Johannes SixtMay 10, 2013
  6. Duy NguyenMay 10, 2013
  7. Junio C HamanoMay 10, 2013
  8. Duy NguyenMay 10, 2013
  9. Junio C HamanoMay 10, 2013
  10. Matt McClureMay 22, 2013
  11. Junio C HamanoMay 22, 2013
  12. William SwansonMay 10, 2013
  13. Matt McClureMay 22, 2013
  14. William SwansonMay 22, 2013

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.