The default tables are usually built with C locale and only suitable
for LANG=C or similar. This should make case insensitive search work
correctly for all single-byte charsets.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
grep.c | 8
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
grep.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/grep.c b/grep.c
index 6e99b01..cb058a5 100644
--- a/grep.c
+++ b/grep.c
@@ -445,10 +445,7 @@ static void compile_regexp(struct grep_pat *p, struct
.sh might cause problems elsewhere, probably.
Noticed-by: Plamen Totev
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
diffcore-pickaxe.c | 11 +++
t/t7812-grep-icase-non-ascii.sh | 7 +++
2 files changed, 18 insertions(+)
diff --git a/diffcore-picka
UTF-8. pcre library might support utf-8 even if libc is
built without locale support.. The peeking code is a copy from
compat/regex/regcomp.c
Helped-by: Ævar Arnfjörð Bjarmason
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
gettext.c | 24 ++--
gette
kwsprep(p->kws);
return;
+ } else if (opt->fixed) {
+ compile_fixed_regexp(p, opt);
+ return;
}
if (opt->pcre) {
Nguyễn Thái Ngọc Duy (12):
grep: break down an "if" stmt in preparation for next changes
test-regex: isolate the
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
grep.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/grep.c b/grep.c
index 7b2b96a..f430d7e 100644
--- a/grep.c
+++ b/grep.c
@@ -403,7 +403,9 @@ static void compile_regexp(struct grep_pat *p, struct
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
test-regex.c | 51 +--
1 file changed, 49 insertions(+), 2 deletions(-)
diff --git a/test-regex.c b/test-regex.c
index 67a1a65..eff26f5 100644
--- a/test-regex.c
+++ b/test
a byte stream and everything
should work. If we force utf-8 based on locale only and pcre validates
utf-8 and the file content is in non-utf8 encoding, things break.
Noticed-by: Plamen Totev
Helped-by: Plamen Totev
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
grep.c
.sh might cause problems elsewhere, probably.
Noticed-by: Plamen Totev
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diffcore-pickaxe.c | 11 +++
t/t7812-grep-icase-non-ascii.sh | 7 +++
2 files changed, 18 insertions(+)
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.
There's another regcomp code block coming in this function that needs
the same error handling. This function can help avoid duplicating
error handling code.
Helped-by: Jeff King
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diffcore-pickaxe.c | 22 +-
1 file change
UTF-8. pcre library might support utf-8 even if libc is
built without locale support.. The peeking code is a copy from
compat/regex/regcomp.c
Helped-by: Ævar Arnfjörð Bjarmason
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
gettext.c | 24 ++--
gette
The default tables are usually built with C locale and only suitable
for LANG=C or similar. This should make case insensitive search work
correctly for all single-byte charsets.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
grep.c | 8
"!icase || ascii_only" is repeated twice in this if/else chain as this
series evolves. Rewrite it (and basically revert the first if
condition back to before the "grep: break down an "if" stmt..." commit).
Helped-by: Junio C Hamano
Signed-off-by: Nguyễn Thái Ngọc
instead. Slower, but accurate.
Noticed-by: Plamen Totev
Helped-by: René Scharfe
Helped-by: Eric Sunshine
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
grep.c | 7 ++-
t/t7812-grep-icase-non-ascii.sh (new +x) | 23
ue at least for UTF-8. For others, let's wait until
people yell up. Chances are nobody uses multibyte, non utf-8 charsets
anymore.
Noticed-by: Plamen Totev
Helped-by: René Scharfe
Helped-by: Eric Sunshine
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
grep.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/grep.c b/grep.c
index 3d63612..92587a8 100644
--- a/grep.c
+++ b/grep.c
@@ -438,10 +438,7 @@ static void compile_regexp(struct grep_pat *p, struct
This is in preparation to turn test-regex into some generic regex
testing command.
Helped-by: Eric Sunshine
Helped-by: Ramsay Jones
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
t/t0070-fundamental.sh | 2 +-
test-regex.c | 12 ++--
2 files changed
e) and
'master' (for error_errno).
Nguyễn Thái Ngọc Duy (10):
copy.c: import copy_file() from busybox
copy.c: delete unused code in copy_file()
copy.c: convert bb_(p)error_msg to error(_errno)
copy.c: style fix
copy.c: convert copy_file() to copy_dir_recursively()
wor
Signed-off-by: Nguyễn Thái Ngọc Duy
---
copy.c | 50 +-
1 file changed, 29 insertions(+), 21 deletions(-)
diff --git a/copy.c b/copy.c
index 074b609..60c7d8a 100644
--- a/copy.c
+++ b/copy.c
@@ -111,8 +111,10 @@ int FAST_FUNC copy_file(const char
-control context (SELinux).
Some probably need a reimplementation to better fit in (verbose
printing code).
Signed-off-by: Nguyễn Thái Ngọc Duy
---
copy.c | 101 +
1 file changed, 7 insertions(+), 94 deletions(-)
diff --git a/copy
Similar to "mv a b/", which is actually "mv a b/a", we extract basename
of source worktree and create a directory of the same name at
destination if dst path is a directory.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 19 ++-
1 file changed,
This finally enables busybox's copy_file() code under a new name
(because "copy_file" is already taken in Git code base). Because this
comes from busybox, POSIXy (or even Linuxy) behavior is expected. More
changes may be needed for Windows support.
Signed-off-by: Nguyễ
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 21 +
builtin/worktree.c | 78 ++
contrib/completion/git-completion.bash | 5 ++-
t/t2028-worktree-move.sh | 26
4 files
bility to clean things up properly when things fail and we may have
to deal with "mv" differences between platforms.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
copy.c | 331 +
1 file changed, 331 insertions(+)
diff --git a/cop
d we should not move that one.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 63 ++
worktree.h | 5 +
2 files changed, 68 insertions(+)
diff --git a/worktree.c b/worktree.c
index 03f8ce9..d5149d8 100644
--- a/worktree.c
+++ b/
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 7 +++-
builtin/worktree.c | 61 ++
contrib/completion/git-completion.bash | 2 +-
t/t2028-worktree-move.sh | 30 +
4 files changed
Signed-off-by: Nguyễn Thái Ngọc Duy
---
copy.c | 85 --
1 file changed, 31 insertions(+), 54 deletions(-)
diff --git a/copy.c b/copy.c
index b7a87f1..074b609 100644
--- a/copy.c
+++ b/copy.c
@@ -82,23 +82,16 @@ int FAST_FUNC
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 25 +
worktree.h | 6 ++
2 files changed, 31 insertions(+)
diff --git a/worktree.c b/worktree.c
index d5149d8..9b227a4 100644
--- a/worktree.c
+++ b/worktree.c
@@ -354,6 +354,31 @@ int validate_worktree(const
It has always been command-list.txt even at the time this
new-command.txt document is added.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/howto/new-command.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/howto/new-command.txt
b/Documentation/howto
v4 is a cleaned up version of v3. Tests are added. Typos in
git-fetch.txt are corrected. The "{ -> origin/}master" format is
dropped.
Nguyễn Thái Ngọc Duy (5):
git-fetch.txt: document fetch output
fetch: refactor ref update status formatting code
fetch: change flag code for d
e new refs based on where... - 2012-04-16)
[5] http://thread.gmane.org/gmane.comp.version-control.git/61657
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-fetch.txt | 46 +
1 file changed, 46 insertions(+)
diff --git a/Documentation/git-f
output.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/fetch.c | 46 --
t/t5510-fetch.sh | 15 +++
2 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 8177f90..c42795b 100644
--- a/builti
. The result should be the same because these call
sites do not contain characters outside ASCII range.
The two strbuf_addf() calls instead of one is mostly to reduce
diff-noise in a future patch where "ref -> ref" is reformatted
differently.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
bu
This makes the fetch flag code consistent with push, where '-' means
deleted ref.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-fetch.txt | 4 ++--
builtin/fetch.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-f
head -> pull/123
Activated with fetch.output=compact.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/config.txt| 5 +++
Documentation/git-fetch.txt | 5 +++
builtin/fetch.c | 75 -
t/t5510-fetch.sh| 17
.
This code is originally written by Jeff King [1]. All genius designs
are his. All bugs are mine (claiming bugs is just more fun :).
[1] http://thread.gmane.org/gmane.comp.version-control.git/273811/focus=273825
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Original thread is [1]. Sebastian may not ne
Similar to $GIT_ASKPASS or $GIT_PROXY_COMMAND, we also read from
config file first then fall back to $GIT_SSH_COMMAND.
This is useful for selecting different private keys targetting the
same host (e.g. github)
Signed-off-by: Nguyễn Thái Ngọc Duy
---
core.gitProxy can also be used for my
s not exist, $GIT_DIR/index-helper.sock does
not exist, so no unix socket call is made by read-cache.c in the first
place.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
BTW 20/20 didn't seem to make it to the list (or my mailbox). And you
probably want to update .mailmap with @novalis.org as ma
ry -
2008-02-12) and makes sure that the prefix stripping/filtering only
happens when RELATIVE_NAME flag is set. The stripping is much simpler
because all stripping now goes through strip_prefix(). So the patch is
mostly about filtering.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diff.c | 13 +
relative to cwd would be much easier to pip this
way.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
It would be great if --relative could be used for this (and it feels
weird that the option performs both actions at once, stripping _and_
filtering where filtering could easily be done with pathspe
By passing "struct diff_options *" to strip_prefix(), we can do some
more intelligent and repeated logic at one place. The removal of
"if (opt->prefix_length)" is just the beginning.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diff.c | 24 ++--
1 file
For more explanation head straight to 3/3. The first two patches are
preparation.
Nguyễn Thái Ngọc Duy (3):
diff.c: refactor strip_prefix()
diff.c: separate "prefix" from RELATIVE_NAME (aka --relative)
diff.c: add --relative-names to be used with --name-only
Documentation/diff-o
To leave room for future expansion, perhaps we should declare that ':'
can't appear in the pattern, so we can add more prefix later, and even
stack them, e.g. "regexp:gitdir:". The prefix can't be one char
long. That should be enough for windows to specify full path
only or worse, a
mix of '/' and '\\'.
At some point, we need to teach wildmatch() that '/' and '\' should be
treated the same way (via a flag) as well. Then we could care less
about '/' vs '\\'. But a Windows dev probably has to do it
gned-off-by: Jeff King
Signed-off-by: Nguyễn Thái Ngọc Duy
---
git-compat-util.h | 17 +
1 file changed, 17 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index 49d4029..c99cddc 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -473,6 +473,23 @@ static inlin
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Torsten, this seems to fix the symlink problem for me. How many times
have I got similar reports from you and still managed to forget ...
t/t2028-worktree-move.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t2028-worktree
r
eyes. If color is used, we can make the branch name's color the same
as HEAD to visually emphasize that it's the current branch.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
For the original discussion of 76c61fb see
http://thread.gmane.org/gmane.comp.version-control.git/263922
l
", exclude it from column width calculation
- implement a new format, { -> origin/}foo, which makes the problem
go away at the cost of a bit harder to read
- reverse all the arrows so we have "* <- looong-ref", again still
hard to read.
Signed-off-by: Nguyễn Thái Ngọc D
This makes the fetch flag code consistent with push, where '-' means
deleted ref.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-fetch.txt | 4 ++--
builtin/fetch.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-f
8..6032776 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -712,8 +712,8 @@ test_expect_success 'fetch compact output' '
grep -e "->" | cut -c 22- >../actual
) &&
cat >expect <<-\EOF &&
- master ->
e new refs based on where... - 2012-04-16)
[5] http://thread.gmane.org/gmane.comp.version-control.git/61657
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-fetch.txt | 46 +
1 file changed, 46 insertions(+)
diff --git a/Documentation/git-f
. The result should be the same because these call
sites do not contain characters outside ASCII range.
The two strbuf_addf() calls instead of one is mostly to reduce
diff-noise in a future patch where "ref -> ref" is reformatted
differently.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
bu
output.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/fetch.c | 47 +--
t/t5510-fetch.sh | 15 +++
2 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 8177f90..2bc609b 100644
--- a/builti
de though. Nevertheless, add an
explicit check for truncation to shut clang up and error out.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
config.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index d7ce34b..880bd4a 100644
--- a/config.c
+++ b/config
dir/file2 or subdir/file3, this is not a
problem because we jump over them anyway. Which may explain why the
bug is hidden for nearly four years.
Fix it by making sure we only skip i-t-a entries when the entry in
question is actual an index entry, not a directory.
Reported-by: Yuri Kanivetsky
Signed-
ize"
in builtin/pack-objects.c:write_one(). I might send 6/5 for that one.
Nguyễn Thái Ngọc Duy (5):
pack-objects: pass length to check_pack_crc() without truncation
sha1_file.c: use type off_t* for object_info->disk_sizep
index-pack: correct "len" type in unpack_data()
index-pack: rep
misleading "error: bad packed object CRC for
..." as a result.
Use off_t for len and datalen. check_pack_crc() already accepts this
argument as off_t and can deal with 4+ GB.
Noticed-by: Christoph Michelbach
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/pack-objects.c | 2 +-
s
This field, filled by sha1_object_info() contains the on-disk size of
an object, which could go over 4GB limit of unsigned long on 32-bit
systems. Use off_t for it instead and update all callers.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/cat-file.c | 4 ++--
cache.h| 2 +-
2
On 32-bit systems with large file support, one entry could be larger
than 4GB and overflow "len". Correct it so we can unpack a full entry.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/index-pack.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git
unpack_entry_data() receives an off_t value from unpack_raw_entry(),
which could be larger than unsigned long on 32-bit systems with large
file support. Correct the type so truncation does not happen. This
only affects bad object reporting though.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin
Use the right type for offsets in this case, off_t, which makes a
difference on 32-bit systems with large file support, and change
formatting code accordingly.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/index-pack.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a
contains all i-t-a entries. Without 1/2, we skip adding
'c' to the tree object 'a/b' (by luck). But if 'a/b' has _nothing_
else but 'a/b/c' then again we will have an empty tree object, which
should not be added in 'a'. It's a cascading effect al
ng but i-t-a entries, we ignore it. But then if 'a/b' contains
only (the non-existing) 'a/b/c', then we should ignore 'a/b' while
building 'a' too. And it goes all the way up to top directory.
Noticed-by: Junio C Hamano
Signed-off-by: Nguyễn Thái Ngọc Duy
-
dir/file2 or subdir/file3, this is not a
problem because we jump over them anyway. Which may explain why the
bug is hidden for nearly four years.
Fix it by making sure we only skip i-t-a entries when the entry in
question is actual an index entry, not a directory.
Reported-by: Yuri Kanivetsky
Signed-
This is a special SHA1. Let's keep it at one place, easier to replace
later when the hash change comes, easier to recognize. Start with an
underscore to reduce the chances somebody may override it without
realizing it's predefined.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t000
Similar to $_EMPTY_TREE this makes it easier to recognize this special
SHA-1 and change hash later.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t1011-read-tree-sparse-checkout.sh | 8
t/t1700-split-index.sh | 24
t/t3102-ls-tree-wildcards.sh
then if 'a/b' contains
only (the non-existing) 'a/b/c', then we should ignore 'a/b' while
building 'a' too. And it goes all the way up to top directory.
Noticed-by: Junio C Hamano
Signed-off-by: Nguyễn Thái Ngọc Duy
---
cache-tree.c | 7 +++
dir/file2 or subdir/file3, this is not a
problem because we jump over them anyway. Which may explain why the
bug is hidden for nearly four years.
Fix it by making sure we only skip i-t-a entries when the entry in
question is actual an index entry, not a directory.
Reported-by: Yuri Kanivetsky
Signed-
blob while we're at it) in one place.
Note that I didn't make lib-pack.sh and t5308 use $_EMPTY_BLOB because
the actual SHA-1 characters matter (t5308) and I'm not so sure about
variable expansion in the case/esac block and not wanting to check all
the shells out there again (lib-pac
ed
by type. Color the arrow the same as HEAD to visually emphasize that
the following branch is HEAD, without paying too much attention to the
actual separators "->" or ","
Signed-off-by: Nguyễn Thái Ngọc Duy
---
I'm going to take Michael's silence as no ob
ng is 32-bit while
off_t can be 64-bit), we got wrong offsets and produce incorrect .idx
file, which may make it look like the .pack file is corrupted.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/pack-objects.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --
is
false.
We will call the callback function "fn" with NULL as "data". The only
callback of this function is fsck_obj_buffer(), which does not touch
"data" at all if it's a blob.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
pack-check.c | 15 +--
pack.h
mance: 0.972682413 s: git command: 'git'
'checkout'
Signed-off-by: Nguyễn Thái Ngọc Duy
---
I mentioned about this some time ago and finally got curious enough
to try out. The saving is in the signficant range in my opinion, but
real world effect is probably lower (or mu
Helped-by: Jeff King
Signed-off-by: Nguyễn Thái Ngọc Duy
---
v3 fixes some memory leak and typos. Most importantly it no longer
depends on core.ignorecase for case-insensitive matching. The choice
must be explicitly made by the user when they choose "gitdir" or
"gi
is
false.
We will call the callback function "fn" with NULL as "data". The only
callback of this function is fsck_obj_buffer(), which does not touch
"data" at all if it's a blob.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/fsck.c |
On 32-bit systems with large file support, one entry could be larger
than 4GB and overflow "len". Correct it so we can unpack a full entry.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/index-pack.c | 14 +++---
1 file changed, 7 insert
misleading "error: bad packed object CRC for
..." as a result.
Use off_t for len and datalen. check_pack_crc() already accepts this
argument as off_t and can deal with 4+ GB.
Noticed-by: Christoph Michelbach
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
bu
Use the right type for offsets in this case, off_t, which makes a
difference on 32-bit systems with large file support, and change
formatting code accordingly.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/index-pack.c | 7 ---
1 file changed, 4 insertions
This field, filled by sha1_object_info() contains the on-disk size of
an object, which could go over 4GB limit of unsigned long on 32-bit
systems. Use off_t for it instead and update all callers.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/cat-file.c | 4
unpack_entry_data() receives an off_t value from unpack_raw_entry(),
which could be larger than unsigned long on 32-bit systems with large
file support. Correct the type so truncation does not happen. This
only affects bad object reporting though.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off
ng is 32-bit while
off_t can be 64-bit), we got wrong offsets and produce incorrect .idx
file, which may make it look like the .pack file is corrupted.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/pack-objects.c | 15 ---
1 file changed, 8 insertions(+)
g to allocate .* over limit" err | wc -l) &&
- test "$n" -gt 1
+test_expect_success 'fsck large blobs' '
+ git fsck 2>err &&
+ test_must_be_empty err
'
test_done
Nguyễn Thái Ngọc Duy (7):
pack-objects: pass length to check_pack_crc() wit
Helped-by: Jeff King
Signed-off-by: Nguyễn Thái Ngọc Duy
---
The diff from v3 is mostly clarification in code and document.
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 18623ee..d971334 100644
--- a/Documentation/config.txt
+++ b/Documentation
IN))
+ if (contains_ita && !hashcmp(sha1, EMPTY_TREE_SHA1_BIN))
continue;
strbuf_grow(&buffer, entlen + 100);
Nguyễn Thái Ngọc Duy (4):
test-lib.sh: introduce and use $EMPTY_TREE
test-lib.sh: introduce and use $EMPTY_BLOB
cache-tree.c: f
This is a special SHA1. Let's keep it at one place, easier to replace
later when the hash change comes, easier to recognize.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t-basic.sh| 2 +-
t/t1100-commit-tree-options.sh | 2 +-
t/t4010-diff-pathspec.sh| 2 --
t/
dir/file2 or subdir/file3, this is not a
problem because we jump over them anyway. Which may explain why the
bug is hidden for nearly four years.
Fix it by making sure we only skip i-t-a entries when the entry in
question is actual an index entry, not a directory.
Reported-by: Yuri Kanivetsky
Signed-
Similar to $EMPTY_TREE this makes it easier to recognize this special
SHA-1 and change hash later.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t1011-read-tree-sparse-checkout.sh | 8
t/t1700-split-index.sh | 24
t/t3102-ls-tree-wildcards.sh
then if 'a/b' contains
only (the non-existing) 'a/b/c', then we should ignore 'a/b' while
building 'a' too. And it goes all the way up to top directory.
Noticed-by: Junio C Hamano
Signed-off-by: Nguyễn Thái Ngọc Duy
---
cache-tree.c | 10 ++
On Wed, Jul 20, 2016 at 6:14 AM, Duy Nguyen wrote:
>> If yes, do you know if someone is working on this? If nobody is working on
>> this, do
>> you have some pointers for me what the main problems are?
>
> The blocker is config file being shared (you do not want to share
> core.worktree and submo
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 8
git-submodule.sh | 8
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 41350db..2a5661d 100644
--- a
ption that the majority of config
variables are shared so it is the default mode. A safer move would be
default writes go to per-worktree file, so that accidental changes are
isolated.
(*) "git config --worktree" points back to "config" file when this
extension is not
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t2029-worktree-submodule.sh (new +x) | 166 +
1 file changed, 166 insertions(+)
create mode 100755 t/t2029-worktree-submodule.sh
diff --git a/t/t2029-worktree-submodule.sh b/t/t2029-worktree-submodule.sh
new file mode
also updates core.worktree. But in there, we
create a new clone, we know what is the initial repository layout, so
we know we can simply update "config" file without risks.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
submodule.c | 16 +++-
1 file changed, 11 insertions(+), 5 del
It looks the the symlink /usr/bin/perl (to /usr/local/bin/perl) has
been removed at least on FreeBSD 10.3. See [1] for more information.
[1]
https://svnweb.freebsd.org/ports/head/UPDATING?r1=386270&r2=386269&pathrev=386270&diff_format=c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Test
f99a20dacb070c5e7f9739efdf96d
[2] git://github.com/freebsd/freebsd.git
[3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=5577
Reported-by: Eric Wong
Signed-off-by: Nguyễn Thái Ngọc Duy
---
This is only of those commits that commit messages are more important
than the patch itself. One of the
[2] git://github.com/freebsd/freebsd.git
[3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=5577
Reported-by: Eric Wong
Signed-off-by: Nguyễn Thái Ngọc Duy
---
v2 goes with Junio's suggestion (good one!). And since there is an
intention to reuse this new function, I make sure all directorie
[2] git://github.com/freebsd/freebsd.git
[3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=5577
Reported-by: Eric Wong
Signed-off-by: Nguyễn Thái Ngọc Duy
---
v3 differs from v2 in one line
--- a/t/t7063-status-untracked-cache.sh
+++ b/t/t7063-status-untracked-cache.sh
@@ -11
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Will this fix the problem I'm replying to? I don't know. I found this
while checking the code and it should be fixed regardless.
config.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
ind
There are two ways to unlock a file: commit, or revert. Rename it to
commit_and_out to avoid confusion.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index 4973256..505e0d0 100644
--- a/config.c
+++ b
ile() is called, rollback_lock_file() becomes no-op.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
config.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/config.c b/config.c
index 505e0d0..e02def4 100644
--- a/config.c
+++ b/config.c
@@ -2483,6 +2483,7 @@ int git_config_rename_section_in_file(const char
*
101 - 200 of 5892 matches
Mail list logo