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

Re: [BUG] aliases not working outside of a working copy

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 31, 2008, 15:46 UTC
Message-ID
<alpine.LSU.1.00.0803311745170.18259@racer.site>
In-Reply-To
<8aa486160803310819r3a905bbeg5f993a55aaf6efbf@mail.gmail.com>
Hi,
On Mon, 31 Mar 2008, Santi Béjar wrote:
Show 5 quoted lines
> af05d67 (Always set *nongit_ok in setup_git_directory_gently())
> 
> The problem is with the alias system that detects if you are in a
> working copy, not with the command, as the
> command just works fine.
Ah, right.  I think that this hunk:
diff --git a/git.c b/git.c
index 13de801..b7729d7 100644
--- a/git.c
+++ b/git.c
@@ -142,14 +142,14 @@ static int split_cmdline(char *cmdline, const char ***arg

 static int handle_alias(int *argcp, const char ***argv)
 {
-       int nongit = 0, envchanged = 0, ret = 0, saved_errno = errno;
+       int envchanged = 0, ret = 0, saved_errno = errno;
        const char *subdir;
        int count, option_count;
        const char** new_argv;
        const char *alias_command;
        char *alias_string;

-       subdir = setup_git_directory_gently(&nongit);
+       subdir = setup_git_directory_gently(NULL);

        alias_command = (*argv)[0];
        alias_string = alias_lookup(alias_command);


of the commit you mentioned is utterly wrong.

Ciao,
Dscho
Previous: Santi BéjarNext: Junio C Hamano
Message 2 of 4 in “[BUG] aliases not working outside of a working copy”
  1. Santi BéjarMar 31, 2008
  2. Johannes SchindelinMar 31, 2008
  3. Junio C HamanoApr 1, 2008
  4. Santi BéjarApr 1, 2008

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.