On Sun, Aug 31, 2014 at 11:49 AM, Duy Nguyen wrote:
> All checkouts share the same repository. Linked checkouts see the
> repository a bit different from the main checkout. When you perform
> the command
>
>
> git checkout --to
>
>
> The checkout at will have a unique
On Sun, Aug 31, 2014 at 3:50 AM, Philip Oakley wrote:
>> @@ -225,6 +225,13 @@ This means that you can use `git checkout -p` to
>> selectively discard
>> edits from your current working tree. See the ``Interactive Mode''
>> section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
>
In the --auto code path, gc_before_repack() is called once in parent
process then again in the forked process. Stop the second run.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/gc.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/builtin/gc.c b/builtin/gc.c
index 8d219d8..fb0cff3 100
On Sat, Aug 30, 2014 at 09:12:57PM +0700, Duy Nguyen wrote:
> On Sat, Aug 30, 2014 at 6:28 PM, Stefan Beller wrote:
> > Auto packing the repository in background for optimum performance.
> > See "git help gc" for manual housekeeping.
> > Auto packing the repository in background for optimum perfor
Hi Jonathan,
nope, haven't seen zit before, it does partly what I would need, but
just for one file at a time (a "bit" awkward) and not really portable
(git clone will not clone .FILE.git/exclude, for example).
Anyway, do you think that a patch which makes .gitignore filename
configurable would b
On Sat, Aug 30, 2014 at 6:16 AM, Jeff King wrote:
> On Fri, Aug 29, 2014 at 07:59:32PM -0700, Shawn Pearce wrote:
>
>> > I agree it is probably a bug on the sending side, but I think last time
>> > this came up we decided to try to be liberal in what we accept. c.f.
>> > http://thread.gmane.org/g
Oh,
I'm a bit confused here - lots of things happening. Submitting patches to
projects is usually fairly simple; it's excitingly fresh to get a bunch of
replies, having the patch set revised, more replies, then a further revised
patch set gets merged to a development branch, and then I get suddenl
for_each_ref() does not include it itself, and without the hash
the detached HEAD may be missed by some frontends (like gitk).
Add test which verifies the head is returned
Update test t6018-rev-list-glob.sh which relied on exact list of
returned hashes.
Signed-off-by: Max Kirillov
---
builtin/
merge_trees_recursive() stores a pointer to its parameter df_conflict in
its struct traverse_info, but it is never actually used. Stop doing
that, remove the parameter and inline the function into merge_trees(),
as the latter is now only passing on its parameters.
Remove the parameter df_conflict
Integrate commit b1d07649588102 from msysgit:
MinGW: Update tests to handle a native eol of crlf
Some of the tests were written with the assumption that the native eol would
always be lf. After defining NATIVE_CRLF on MinGW, these tests began failing.
This change will update the tests to a
From: Pat Thoyts
Commit 95f31e9a correctly points out that the NATIVE_CRLF setting is
incorrectly set on Mingw git. However, the Makefile variable is not
propagated to the C preprocessor and results in no change. This patch
pushes the definition to the C code and adds a test to validate that
when
HEAD is not explicitly used as a starting commit for
calculating reachability, so if it's detached and reflogs
are disabled it may be pruned.
Add test which demonstrates it.
Signed-off-by: Max Kirillov
---
Hi.
This is a followup of
http://thread.gmane.org/gmane.comp.version-control.git/255996
Am 30.08.2014 21:30, schrieb David Aguilar:
> Use `git rev-parse --quiet` instead of redirecting to /dev/null.
>
> Signed-off-by: David Aguilar
> ---
> git-stash.sh | 14 +++---
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/git-stash.sh b/git-stash.sh
> index bcc757
Am 30.08.2014 21:30, schrieb David Aguilar:
> `git rev-parse` is being called with --quiet so there's no need to
> redirect to /dev/null.
>
> Signed-off-by: David Aguilar
> ---
> git-bisect.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-bisect.sh b/git-bisect.sh
From: "Nguyễn Thái Ngọc Duy"
"git checkout --to" sets up a new working directory with a .git file
pointing to $GIT_DIR/repos/. It then executes "git checkout" again
on the new worktree with the same arguments except "--to" is taken
out. The second checkout execution, which is not contaminated wi
On Sat, Aug 30, 2014 at 9:56 PM, Alex Henrie wrote:
> Hi, I submitted this patch a week ago and got no reply, so I'm sending
> it again and CC'ing the original authors this time...
>
> Signed-off-by: Alex Henrie
Looks good to me.
Acked-by: Johan Herland
--
Johan Herland,
www.herland.net
--
progress.c:66: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
You can not cast a undeclared into void in git-compat-uitl.h:
#define timer_create(clockid, sevp, timerp) ((void) (clockid), (void) (sevp),
(void) (timerp), errno
Removing the cast of a define into (void) makes the
Hi, I submitted this patch a week ago and got no reply, so I'm sending
it again and CC'ing the original authors this time...
Signed-off-by: Alex Henrie
---
builtin/commit.c | 2 +-
builtin/ls-files.c | 2 +-
builtin/merge.c| 4 ++--
builtin/notes.c| 2 +-
builtin/rm.c | 2 +-
git
Use `git rev-parse --quiet` instead of redirecting to /dev/null.
Signed-off-by: David Aguilar
---
git-stash.sh | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index bcc757b..5a5185b 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -50
`git rev-parse` is being called with --quiet so there's no need to
redirect to /dev/null.
Signed-off-by: David Aguilar
---
git-bisect.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-bisect.sh b/git-bisect.sh
index 1e0d602..c1c2321 100755
--- a/git-bisect.sh
+++ b/git-b
Use starts_with() instead of memcmp() to check if NUL-terminated
strings match prefixes. This gets rid of some magic string length
constants.
Signed-off-by: Rene Scharfe
---
imap-send.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/imap-send.c b/imap-send.c
index
Instead of using skip_prefix() to check the first part of the string
and then strcmp() to check the rest, simply use strcmp() to check the
whole string.
Signed-off-by: Rene Scharfe
---
config.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/config.c b/config.c
index 058
Am 30.08.2014 um 15:16 schrieb Jeff King:
On Fri, Aug 29, 2014 at 07:59:32PM -0700, Shawn Pearce wrote:
I agree it is probably a bug on the sending side, but I think last time
this came up we decided to try to be liberal in what we accept. c.f.
http://thread.gmane.org/gmane.comp.version-contro
Use strbuf to build the new base, which takes care of allocations and
the terminating NUL character automatically.
Signed-off-by: Rene Scharfe
---
http-walker.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/http-walker.c b/http-walker.c
index dbddfaa..88da54
On August 28, 2014 at 11:26 AM Matthieu Moy
wrote:
> dev writes:
>
> > Actually I found a file called GIT-BUILD-OPTIONS :
>
> That's a generated file (not included by the Makefile, but by some
> shell
> scripts later), don't edit it. Use config.mak for your build
> configuration.
good to know
On August 28, 2014 at 8:05 PM "brian m. carlson"
wrote:
> On Thu, Aug 28, 2014 at 12:54:30AM -0400, dev wrote:
> > Funny I don't see libcurl anywhere. Thought that was needed? Also
> > the
> > RUNPATH
> > and RPATH look duplicated and slightly borked but the initial data
> > there
> > is correct
On Sat, Aug 30, 2014 at 6:28 PM, Stefan Beller wrote:
> Auto packing the repository in background for optimum performance.
> See "git help gc" for manual housekeeping.
> Auto packing the repository in background for optimum performance.
> See "git help gc" for manual housekeeping.
>
> Obviously it
t5309 checks that we detect and fail when there is a cycle
of deltas (i.e., A is a delta on B, which is a delta on A).
It also checks the cases where we have such a cycle, but we
have an extra copy of the object either in the same pack or
in another one. These cases are recoverable, because we can
On Fri, Aug 29, 2014 at 07:59:32PM -0700, Shawn Pearce wrote:
> > I agree it is probably a bug on the sending side, but I think last time
> > this came up we decided to try to be liberal in what we accept. c.f.
> > http://thread.gmane.org/gmane.comp.version-control.git/232305/focus=232310
>
> II
On 22.08.2014 22:30, Junio C Hamano wrote:
> @@ -1226,12 +1232,28 @@ static int delete_only(struct command *commands)
> return 1;
> }
>
> +static char *prepare_push_cert_nonce(const char *sitename, const char *dir)
> +{
> + struct strbuf buf = STRBUF_INIT;
> + unsigned char sha1[20
Hi,
so I fetched from a repository today and I got the message twice:
> Auto packing the repository in background for optimum performance.
> See "git help gc" for manual housekeeping.
I'm running git version 2.1.0.rc2
Full output:
$ git fetch --all --prune
Fetching origin
Fetching mainline
rem
On Sat, Aug 30, 2014 at 6:11 PM, Eric Sunshine wrote:
> On Sat, Aug 30, 2014 at 4:33 AM, Nguyễn Thái Ngọc Duy
> wrote:
>> This collapes some bug fix patches into the main ones, adds a few more
>> tests to cover recent changes, and removes advice.checkoutLocked (when
>> things are controversal, p
On Sat, Aug 30, 2014 at 4:33 AM, Nguyễn Thái Ngọc Duy wrote:
> This collapes some bug fix patches into the main ones, adds a few more
> tests to cover recent changes, and removes advice.checkoutLocked (when
> things are controversal, probably best to go without them until they
> are settled). Diff
Get rid of magic string length constants by using skip_prefix() instead
of memcmp() and use xstrfmt() for building a string instead of a
PATH_MAX-sized buffer, snprintf() and xstrdup().
Signed-off-by: Rene Scharfe
---
pack-write.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
Both callers of check_ref() pass in NUL-terminated strings for name.
Remove the len parameter and then use skip_prefix() and starts_with()
instead of memcmp() to check if it starts with certain strings. This
gets rid of several magic string length constants and a strlen() call.
Signed-off-by: Ren
On 2014-08-28 21.20, Junio C Hamano wrote:
> It appears that I missed this patch? You seem to have rerolled the
> corresponding 2/2, to which I responded ($gmane/255507). Is this
> one still viable/necessary?
It seems that both the t0027 and the native_crlf fixes (from MINGW)
deserve a re-roll f
From: Dennis Kaarsemaker
For normal use cases, it does not make sense for 'checkout' to work on
a bare repository, without a worktree. But "checkout --to" is an
exception because it _creates_ a new worktree. Allow this option to
run on bare repositories.
People who check out from a bare reposito
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t2025-checkout-to.sh | 18 ++
1 file changed, 18 insertions(+)
diff --git a/t/t2025-checkout-to.sh b/t/t2025-checkout-to.sh
index 9f701a1..aa24ea8 100755
--- a/t/t2025-checkout-to.sh
+++ b/t/t2025-checkout-to.sh
@@ -96,4 +96,22 @@ test_ex
In linked checkouts, borrowed parts like config is taken from
$GIT_COMMON_DIR. $GIT_DIR/config is never used. Report them as
garbage.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/count-objects.c | 4 +++-
cache.h | 1 +
path.c
Currently git_path("info/sparse-checkout") resolves to
$GIT_COMMON_DIR/info/sparse-checkout in multiple worktree mode. It
makes more sense for the sparse checkout patterns to be per worktree,
so you can have multiple checkouts with different parts of the tree.
With this, "git checkout --to " on a
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout.c | 54 --
t/t2025-checkout-to.sh | 6 ++
2 files changed, 58 insertions(+), 2 deletions(-)
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 6373823..4ae925a 100644
--- a/b
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/gc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/gc.c b/builtin/gc.c
index 8d219d8..3bfb990 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -298,7 +298,7 @@ int cmd_gc(int argc, const ch
"git checkout --to" sets up a new working directory with a .git file
pointing to $GIT_DIR/repos/. It then executes "git checkout" again
on the new worktree with the same arguments except "--to" is taken
out. The second checkout execution, which is not contaminated with any
info from the current rep
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/gc.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/builtin/gc.c b/builtin/gc.c
index 3bfb990..e38c902 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -55,6 +55,17 @@ static
(alias R=$GIT_COMMON_DIR/repos/)
- linked checkouts are supposed to keep its location in $R/gitdir up
to date. The use case is auto fixup after a manual checkout move.
- linked checkouts are supposed to update mtime of $R/gitdir. If
$R/gitdir's mtime is older than a limit, and it points t
This fixes common problems in these code about error handling,
forgetting to close the file handle after fprintf() fails, or not
printing out the error string..
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/branch.c | 4 +---
builtin/init-db.c | 7 +--
dae
One branch obviously can't be checked out at two places (but detached
heads are ok). Give the user a choice in this case: --detach, -b
new-branch, switch branch in the other checkout first or simply 'cd'
and continue to work there.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout.c |
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
cache.h | 2 ++
wrapper.c | 31 +++
2 files changed, 33 insertions(+)
diff --git a/cache.h b/cache.h
index e3ff7dc..bf4d15e 100644
--- a/cache.h
+++ b/cache.h
@@ -1359,6 +1359,8 @@ static inline
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
Documentation/config.txt | 7 +++
builtin/gc.c | 11 +++
2 files changed, 18 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 286e539..57999fa 100644
--- a/Document
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
setup.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/setup.c b/setup.c
index a17389f..79f79f2 100644
--- a/setup.c
+++ b/setup.c
@@ -346,6 +346,10 @@ static int check_repository_format_gently(const
If the file "$GIT_DIR/commondir" exists, it contains the value of
$GIT_COMMON_DIR.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
Documentation/gitrepository-layout.txt | 7 ++
setup.c| 43 +-
2 files ch
If $GIT_COMMON_DIR is set, $GIT_OBJECT_DIRECTORY should be
$GIT_COMMON_DIR/objects, not $GIT_DIR/objects. Just let rev-parse
--git-path handle it.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
git-sh-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
git-stash.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index 393e1ec..41f8f6b 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -184,7 +184,7 @@ store_stash () {
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
setup.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/setup.c b/setup.c
index 176d505..a17389f 100644
--- a/setup.c
+++ b/setup.c
@@ -342,7 +342,9 @@ void setup_work_tree(void)
static int
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
setup.c | 37 +
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/setup.c b/setup.c
index 0a22f8b..425fd79 100644
--- a/setup.c
+++ b/setup.c
@@ -238,31 +238,36 @@ void verify_
If $GIT_COMMON_DIR is set, it should be $GIT_COMMON_DIR/hooks/, not
$GIT_DIR/hooks/. Just let rev-parse --git-path handle it.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
git-am.sh | 22 +++---
git-rebase--interactive.sh
This variable is intended to support multiple working directories
attached to a repository. Such a repository may have a main working
directory, created by either "git init" or "git clone" and one or more
linked working directories. These working directories and the main
repository share the same r
The repo setup procedure is updated to detect $GIT_DIR/commondir and
set $GIT_COMMON_DIR properly.
The core.worktree is ignored when $GIT_COMMON_DIR is set. This is
because the config file is shared in multi-checkout setup, but
checkout directories _are_ different. Making core.worktree effective
i
This allows git_path() to redirect info/fast-import to another place
if needed
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
fast-import.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index d9c068b..ea426c4 100644
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
git-pull.sh | 2 +-
git-stash.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index 18a394f..6ab0c31 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -240,7 +240,7 @@ test true
We allow the user to relocate certain paths out of $GIT_DIR via
environment variables, e.g. GIT_OBJECT_DIRECTORY, GIT_INDEX_FILE and
GIT_GRAFT_FILE. Callers are not supposed to use git_path() or
git_pathdup() to get those paths. Instead they must use
get_object_directory(), get_index_file() and get
We've been avoiding PATH_MAX whenever possible. This patch makes
get_pathname() return a strbuf and updates the callers to take
advantage of this. The code is simplified as we no longer need to
worry about buffer overflow.
vsnpath() behavior is changed slightly: previously it always clears
the buf
In the previous patch, git_snpath() is modified to allocate a new
strbuf buffer because vsnpath() needs that. But that makes it
awkward because git_snpath() receives a pre-allocated buffer from
outside and has to copy data back. Rename it to strbuf_git_path()
and make it receive strbuf directly.
U
Among pathnames in $GIT_DIR, e.g. "index" or "packed-refs", we want to
automatically and silently map some of them to the $GIT_DIR of the
repository we are borrowing from via $GIT_COMMON_DIR mechanism. When
we formulate the pathname for its lockfile, we want it to be in the
same location as its fi
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/commit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index 461c3b1..4b9f012 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -156,7 +156,7 @@ static vo
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
path.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/path.c b/path.c
index 2cb2e61..65881aa 100644
--- a/path.c
+++ b/path.c
@@ -78,6 +78,16 @@ void strbuf_git_path(struct strbuf *s
The name vsnpath() gives an impression that this is general path
handling function. It's not. This is the underlying implementation of
git_path(), git_pathdup() and strbuf_git_path() which will prefix
$GIT_DIR in the result string.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
Before the previous commit, get_pathname returns an array of PATH_MAX
length. Even if git_path() and similar functions does not use the
whole array, git_path() caller can, in theory.
After the commit, get_pathname() may return a buffer that has just
enough room for the returned string and git_path
This collapes some bug fix patches into the main ones, adds a few more
tests to cover recent changes, and removes advice.checkoutLocked (when
things are controversal, probably best to go without them until they
are settled). Diff against current version in 'pu'
diff --git a/Documentation/config.tx
69 matches
Mail list logo