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

Re: RFC PATCH: support for default remote in StGIT

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Dec 10, 2006, 16:41 UTC
Message-ID
<b0943d9e0612100841h7d064c7cs37f882f91e3eddf8@mail.gmail.com>
In-Reply-To
<1165657360.2816.61.camel@portland.localdomain>
On 09/12/06, Pavel Roskin <proski@gnu.org> wrote:
> Sorry, I was unlucky to pick your address from setup.py, where it's
> incorrect (gmail.org, not gmail.com), so I'm sending you another copy.
Thanks for spotting this.
> One approach is to leave the default remote selection completely to git.
> The downside is that StGIT prints the remote it's pulling from.  Now
> StGIT will have to print common words that it's pulling something.  Or
> maybe it shouldn't print anything?

Yann started a thread on this but I didn't find the time to look at this properly. He's idea was to store the remote branch information in the StGIT metadata but I'd like to leave this for GIT to deal with.

The StGIT UI can probably be modified to display something useful but I don't see a problem if it doesn't.

Show 7 quoted lines
> The other approach is to calculate the default remote in StGIT.  This
> would allow StGIT to tell the user where it's pulling from.
>
> However, I had to introduce a function that ignores errors except there
> is any output on stderr.  This is because git-repo-config returns error
> code 1 if it cannot find the key.  Maybe git-repo-config should have an
> option not to fail in this case?  Perhaps a default value to return?

With the recent changes, StGIT shares the config files with GIT and it has direct access to git settings without the need to use git-repo-config. Just use "config.has_key" and "config.get_option".

Maybe a combination of your two options - StGIT could try to get the default branch and, if there isn't any in the config files, just invoke git-pull without any argument (and display something like "pulling from default").

Next: Pavel Roskin
Message 1 of 3 in “Re: RFC PATCH: support for default remote in StGIT”
  1. Catalin MarinasDec 10, 2006
  2. Check git pull remote before defaulting to 'origin'Pavel Roskin, Jan 9, 2007
  3. Catalin MarinasJan 9, 2007

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.