From: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
To: "Ciprian Dorin Craciun" <ciprian.craciun@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: setup_git_directory_gently contract question?
Date: Tue, 27 May 2008 22:32:41 +0700 [thread overview]
Message-ID: <fcaeb9bf0805270832lc779a37gd9e58d0790981788@mail.gmail.com> (raw)
In-Reply-To: <8e04b5820805270710v3a06e5c2if2dcf3b94ef40c1f@mail.gmail.com>
On Tue, May 27, 2008 at 9:10 PM, Ciprian Dorin Craciun
<ciprian.craciun@gmail.com> wrote:
> Is the function setup_git_directory_gently supposed to change the
> current working directory, or should it keep the initial one?
It will change if it finds a worktree.
> What is the meaning of nongit_ok?
Setting it to a non null pointer prevents git from die() when no git
repository can be found.
> Because if I use nongit_ok != NULL, but *nongit_ok == 1, this
> function changes the current working directory to the top of the
> worktree directory.
It returns a directory prefix so that you can still know the original
current working directory. You can do as following to have current
directory "unchanged"
prefix = setup_git_directory_gently(&nongit_ok);
if (prefix) chdir(prefix)
> Thanks,
> Ciprian Craciun.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Duy
next prev parent reply other threads:[~2008-05-27 15:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 14:10 setup_git_directory_gently contract question? Ciprian Dorin Craciun
2008-05-27 14:35 ` Ciprian Dorin Craciun
2008-05-27 15:32 ` Nguyen Thai Ngoc Duy [this message]
2008-05-27 22:46 ` Junio C Hamano
2008-05-28 7:14 ` Ciprian Dorin Craciun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fcaeb9bf0805270832lc779a37gd9e58d0790981788@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=ciprian.craciun@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).