On Sat, Dec 14, 2013 at 5:54 PM, Nguyễn Thái Ngọc Duy wrote:
> Known issues
Scripts that expand "$GIT_DIR/objects" and are not aware about the new
env variable. I introduced "test-path-utils --git-path" to test
git_path(). I could move it to "git rev-parse --git-path" for use in
scripts, but ther
On Sun, Dec 15, 2013 at 3:23 AM, Ramsay Jones
wrote:
> On 14/12/13 10:54, Nguyễn Thái Ngọc Duy wrote:
>> This is the underlying implementation of git_path(), git_pathdup() and
>> git_snpath() which will prefix $GIT_DIR in the result string. Put git_
>> prefix in front of it to avoid the confusion
Replying to very old but newly relevant mail:
Chris Rorvick :
> Import of a trivial CVS repository fails due to a cvsps bug.
The t9605 test you sent me is now part of cvs-fast-export's
regression-test suite, along with suitably adapted versions of
t960[1-4] from the git tree. Here is a summary
The -O flag really shouldn't silently fail to do anything when given a
path that it can't read from.
However, it should be able to read from un-mappable files, such as
pipes/fifos, /dev/null (as we document in the next patch), or in fact
*any* empty file (since Linux 2.6.12). (Especially since we
diff.orderfile acts as a default for the -O command line option.
[sb: split up aw's original patch; reworked tests and docs]
[FIXME: Relative paths should presumably be interpreted relative to
repository root; how should this be accomplished?]
Signed-off-by: Anders Waldenborg
Signed-off-by: Sam
The original purpose of this patch [series] was to allow specifying
the "-O" option for "git diff" in the config, but I need help with the
relative path handling [RFC 3].
It also added tests for "git diff -O", which I have split out because
they are independantly useful [PATCH 1].
I also noticed
Heavily adapted from Anders' patch:
"diff: Add diff.orderfile configuration variable"
Signed-off-by: Anders Waldenborg
Signed-off-by: Samuel Bronson
---
t/t4056-diff-order.sh | 72 +++
1 file changed, 72 insertions(+)
create mode 100755 t/t4056-d
On 14/12/13 10:54, Nguyễn Thái Ngọc Duy wrote:
> This is the underlying implementation of git_path(), git_pathdup() and
> git_snpath() which will prefix $GIT_DIR in the result string. Put git_
> prefix in front of it to avoid the confusion that this is a generic
> path handling function.#
>
> Sign
On Sat, Dec 14, 2013 at 8:33 PM, Junio C Hamano wrote:
> Antoine Pelisse writes:
>
>> If you only want to see the diff applied to master, you
>> should run:
>>
>> $ git diff --ours
>
> Does "git diff HEAD" have the same/similar effect?
Yes, it does produce the same output as --ours.
>> You
Duy Nguyen writes:
> The exception list could be equally long (most of them are *_HEAD).
> .git is also used for temporary files with mkstemp, but I think that's
> safe for sharing. What could break is when people add a new local
> *_HEAD and forget to update the exception list.
Sensible; it may
"Philip Oakley" writes:
> Would this be a good use of the
>* Magic pathspecs like ":(icase)
> that was recently released (v1.8.5 2Dec13) so that the merge stages
> can be named.
Because the pathspec mechahism is for you to tell an operation that
works on a collection of paths (e.g. "all th
Antoine Pelisse writes:
> If you only want to see the diff applied to master, you
> should run:
>
> $ git diff --ours
Does "git diff HEAD" have the same/similar effect?
> You can also have a look at what is currently being applied:
>
> $ git diff :1:gcc/tree-ssa-threadedge.c :3:gcc/tree
On Sat, Dec 14, 2013 at 04:28:14PM +0100, Paul Menzel wrote:
> in coreboot we try to check for whitespace errors before committing. Of
> course a pre-commit hook is the way to go, but unfortunately it is not
> so simple (at least for me) as the following requirements exist.
>
> 1. Only the files a
Dear git folks,
in coreboot we try to check for whitespace errors before committing. Of
course a pre-commit hook is the way to go, but unfortunately it is not
so simple (at least for me) as the following requirements exist.
1. Only the files actually committed should be checked. That means
runni
On Thu, Dec 12, 2013 at 11:26:36AM -0800, Junio C Hamano wrote:
> Adam Spiers writes:
> > On Mon, Apr 22, 2013 at 09:18:46AM +0200, Jeremy Rosen wrote:
> >> David Green wrote:
> >> > Please remember that I don't consider myself a gatekeeper to
> >> > git subtree. In fact I could use some help rev
- Original Message -
From: "Antoine Pelisse"
You can also have a look at what is currently being applied:
$ git diff :1:gcc/tree-ssa-threadedge.c
:3:gcc/tree-ssa-threadedge.c
By the way, does anybody know a better way to do that ? I happen to do
that quite a lot when fixing c
Currently the --no-index option is parsed in diff_no_index(). Move the
detection if a no-index diff should be executed to builtin/diff.c, where
we can use it for executing diff_no_index() conditionally. This will
also allow us to execute other operations conditionally, which will be
done in the n
git diff --no-index ... currently reads the index, during setup, when
calling gitmodules_config(). This results in worse performance when the
index is not actually needed. This patch avoids calling
gitmodules_config() when the --no-index option is given. The times for
executing "git diff --no-in
Some buffers created with PATH_MAX length are not checked when being
written, and can overflow if PATH_MAX is not big enough to hold the
path.
Replace those buffers by strbufs so that their size is automatically
grown if necessary. They are created as static local variables to avoid
reallocating m
Signed-off-by: John Szakmeister
Signed-off-by: Junio C Hamano
Reviewed-by: Felipe Contreras
---
Thanks for the extra patch Junio. I incorporated it and fixed a
few other minor violations I found afterwards. This version
builds on the first version of the patch--without dropping the
gpointer c
This makes sure repack won't drop detached HEADS from $GIT_DIR/repos/
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 21 +
refs.h | 1 +
revision.c | 1 +
3 files changed, 23 insertions(+)
diff --git a/refs.c b/refs.c
index 8ef1cb0..a9c8651 100644
--- a/refs.c
++
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/refs.c b/refs.c
index d856b1a..8ef1cb0 100644
--- a/refs.c
+++ b/refs.c
@@ -1721,32 +1721,33 @@ static int do_for_each_ref(struct ref_cache *refs,
const char *base,
This is effective when a ref is updated from the super repository as
well as all linked repositories because "repos" directory is shared
between all repos.
We could even forbid a ref update if it's some repo's HEAD. But I'd
rather see a generic, permanent ref locking mechanism in place first
and m
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index 5e5a382..3691ef5 100644
--- a/refs.c
+++ b/refs.c
@@ -2676,13 +2676,24 @@ static int copy_msg(char *buf, const char *msg)
int log_ref_setup(co
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout.c | 49 +++--
1 file changed, 47 insertions(+), 2 deletions(-)
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 95a1a61..6353557 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
environment.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/environment.c b/environment.c
index d5ae7a3..cbfa879 100644
--- a/environment.c
+++ b/environment.c
@@ -125,13 +125,17 @@ static char *expand_namespace(const char *raw
Signed-off-by: Nguyễn Thái Ngọc Duy
---
setup.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/setup.c b/setup.c
index 01fe89a..397eecc 100644
--- a/setup.c
+++ b/setup.c
@@ -406,16 +406,13 @@ static const char *setup_explicit_git_dir(const char
*gitdir
alias REPO=$GIT_SUPER_DIR/repos/
- split repos are supposed to update mtime of $REPO/gitdir
- split repos are supposed to keep its location in $REPO/gitdir up to
date
- "git checkout --to" is supposed to create $REPO/locked if the new
repo is on a different partition than the shared one
Signed-off-by: Nguyễn Thái Ngọc Duy
---
cache.h | 2 +-
environment.c | 2 +-
setup.c | 44 ++--
3 files changed, 32 insertions(+), 16 deletions(-)
diff --git a/cache.h b/cache.h
index 4c09223..e036a7d 100644
--- a/cache.h
+++ b/cache.h
@@ -4
The same rules for git repo setup apply except:
- detect super .git files, set $GIT_SUPER_DIR accordingly
- if $GIT_SUPER_DIR is set (or specified by super .git files), look
for non-worktree stuff in this directory instead of $GIT_DIR. This
mostly affects is_git_directory() and check_reposito
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-checkout.txt | 6 +++
Documentation/gitrepository-layout.txt | 3 +-
builtin/checkout.c | 94 ++
path.c | 3 +-
4 files changed, 104 insertions(
Signed-off-by: Nguyễn Thái Ngọc Duy
---
setup.c | 28 ++--
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/setup.c b/setup.c
index e9f0ef6..01fe89a 100644
--- a/setup.c
+++ b/setup.c
@@ -182,28 +182,38 @@ void verify_non_filename(const char *prefix, const ch
If a .git file contains
gitsuper:
gitdir:
then we set GIT_SUPER_DIR to and GIT_DIR to
$GIT_SUPER_DIR/repos/.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
cache.h | 1 +
setup.c | 41 +
2 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/cache.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
setup.c | 44
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/setup.c b/setup.c
index 5432a31..c040981 100644
--- a/setup.c
+++ b/setup.c
@@ -278,15 +278,31 @@ static int check_repository_format_g
The UI and behavior are taking shape now. On the UI side, you do
git checkout --to /somewhere -b newbranch origin/master
which will create worktree-only repo at /somewhere. "git prune --repos"
could be used to remove cruft in .git/repos.
On the behavior side, you should be able to do everythin
Signed-off-by: Nguyễn Thái Ngọc Duy
---
path.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/path.c b/path.c
index 06863b7..08aa213 100644
--- a/path.c
+++ b/path.c
@@ -80,6 +80,19 @@ char *git_snpath(char *buf, size_t n, const char *fmt, ...)
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. All 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
If $GIT_SUPER_DIR is defined, the repository is splitted into two
places:
- HEAD, logs/HEAD, index, other top-level refs and unrecognized files
are from $GIT_DIR
- the rest like objects, refs, info, hooks, packed-refs, shallow...
are from $GIT_SUPER_DIR
The redirection is done by git_pat
This is the underlying implementation of git_path(), git_pathdup() and
git_snpath() which will prefix $GIT_DIR in the result string. Put git_
prefix in front of it to avoid the confusion that this is a generic
path handling function.#
Signed-off-by: Nguyễn Thái Ngọc Duy
---
path.c | 8
We've been avoiding PATH_MAX whenever possible. This patch avoids
PATH_MAX in get_pathname() and gives it enough room not to worry about
really long paths.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
path.c | 28
1 file changed, 16 insertions(+), 12 deletions(-)
diff --
This allows git_path() to redirect info/fast-import to another place
if needed
Signed-off-by: Nguyễn Thái Ngọc Duy
---
fast-import.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index f4d9969..04bba3d 100644
--- a/fast-import.c
+++ b/fast-
git_path() understands the path given to it. Unrecognized paths by
default go to $GIT_SUPER_DIR/repos//... in split-repo mode. We
want the %s.lock file to be at the same place %s file is. Avoid
git_path() in this case and use log_file as %s, which should contain
the final path of %s file.
Signed-o
Jonathan Nieder writes:
> Hi,
>
> Thomas Gummerer wrote:
>
>> Signed-off-by: Thomas Gummerer
>
> Thanks, and sorry for the slow follow-up.
>
> [...]
>> --- a/builtin/diff.c
>> +++ b/builtin/diff.c
>> @@ -16,6 +16,9 @@
> [...]
>> @@ -283,14 +286,57 @@ int cmd_diff(int argc, const char **argv, con
On Wed, Dec 11, 2013 at 12:19 PM, Paulo Matos wrote:
> On 11/12/2013 11:09, Antoine Pelisse wrote:
>>>
>>>
>>> I don't know how to interpret the fact that the line you sent (with the
>>> obvious --conflicts being --conflict) outputs nothing...
>>
>>
>> That is expected. git-checkout with this opti
44 matches
Mail list logo