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

[JGIT PATCH 0/6] Add prune of stale tracking branches to fetch

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 12, 2009, 23:54 UTC
Message-ID
<1234482880-1316-1-git-send-email-spearce@spearce.org>

This series teaches "jgit fetch" how to prune stale tracking branches that have been removed from the remote repository. We can now do both a fetch and a prune in a single network connection.

I wanted to also add this for push, but its going to be more complex. The RefSpec data I need isn't available in the PushProcess code path, and the Transport.push() method isn't doing me any favors at making it available to me.

I need to move on to some other things today, so I'm posting this fetch series now as this looks good as-is.

Shawn O. Pearce (6):
  Fix RefUpdate.delete to update the result status
  Add setBoolean, setInt to RepositoryConfig
  Add RefSpec.expandFromDestination for reverse mappings
  Add the remote.name.mirror flag to RemoteConfig
  Don't pass TagOpt to FetchProcess, get it from the Transport
  Teach fetch to prune stale tracking branches
 .../org/spearce/jgit/pgm/AbstractFetchCommand.java |    8 ++-
 .../src/org/spearce/jgit/pgm/Fetch.java            |    9 +++
 .../spearce/jgit/transport/RefSpecTestCase.java    |   22 ++++++
 .../src/org/spearce/jgit/lib/RefUpdate.java        |    4 +-
 .../src/org/spearce/jgit/lib/RepositoryConfig.java |   57 +++++++++++++++
 .../org/spearce/jgit/transport/FetchProcess.java   |   55 +++++++++++++--
 .../src/org/spearce/jgit/transport/RefSpec.java    |   73 ++++++++++++++------
 .../org/spearce/jgit/transport/RemoteConfig.java   |   40 +++++++++++-
 .../src/org/spearce/jgit/transport/Transport.java  |   29 ++++++++-
 9 files changed, 265 insertions(+), 32 deletions(-)
Next: Shawn O. Pearce
Message 1 of 10 in “Add prune of stale tracking branches to fetch”
  1. 0/6 Add prune of stale tracking branches to fetchShawn O. Pearce, Feb 12, 2009
  2. 1/6 Fix RefUpdate.delete to update the result statusShawn O. Pearce, Feb 12, 2009
  3. 2/6 Add setBoolean, setInt to RepositoryConfigShawn O. Pearce, Feb 12, 2009
  4. 3/6 Add RefSpec.expandFromDestination for reverse mappingsShawn O. Pearce, Feb 12, 2009
  5. 4/6 Add the remote.name.mirror flag to RemoteConfigShawn O. Pearce, Feb 12, 2009
  6. 5/6 Don't pass TagOpt to FetchProcess, get it from the TransportShawn O. Pearce, Feb 12, 2009
  7. 6/6 Teach fetch to prune stale tracking branchesShawn O. Pearce, Feb 12, 2009
  8. Junio C HamanoFeb 13, 2009
  9. Shawn O. PearceFeb 13, 2009
  10. Junio C HamanoFeb 13, 2009

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.