Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t5500-fetch-pack.sh | 22 ++
t/t5539-fetch-http-shallow.sh | 22 ++
2 files changed, 44 insertions(+)
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 453c571..53de68c 100755
--- a/t/t5500
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/fetch-options.txt | 5 +
Documentation/git-fetch-pack.txt| 5 +
Documentation/gitremote-helpers.txt | 4
builtin/fetch-pack.c| 10 ++
builtin/fetch.c | 17
ev-list --since=... --not
ref".
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/technical/pack-protocol.txt | 3 ++-
Documentation/technical/protocol-capabilities.txt | 9 +
upload-pack.c | 22 --
3 files changed,
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t5500-fetch-pack.sh | 22 ++
t/t5539-fetch-http-shallow.sh | 24
2 files changed, 46 insertions(+)
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index e5f83bf..453c571 100755
--- a/t
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/fetch-options.txt | 4
Documentation/git-fetch-pack.txt| 4
Documentation/gitremote-helpers.txt | 3 +++
builtin/fetch-pack.c| 4
builtin/fetch.c | 12 ++--
fetch-pack.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
object.h | 2 +-
upload-pack.c | 51 ---
2 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/object.h b/object.h
index f8b6442..614a006 100644
--- a/object.h
+++ b/object.h
@@ -31,7 +31,7
ed-by: Eric Sunshine
Helped-by: Junio C Hamano
Signed-off-by: Dongcan Jiang
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/fetch-options.txt | 5 +
Documentation/git-fetch-pack.txt | 5 +
Documentation/gitremote-helpers.txt |
o "git fetch" to retry
- Make "git clone" use "git fetch --resume" to get the pack
[1] Quote from https://lwn.net/Articles/674392/ "she noted that Git
still does not support interrupting and resuming download operations,
which is an important bug to fix.&
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/technical/pack-protocol.txt | 2 ++
Documentation/technical/protocol-capabilities.txt | 9 +++
upload-pack.c | 30 +--
3 files changed, 39 insertions(+), 2 deletions
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t5544-fetch-resume.sh (new +x) | 42
1 file changed, 42 insertions(+)
create mode 100755 t/t5544-fetch-resume.sh
diff --git a/t/t5544-fetch-resume.sh b/t/t5544-fetch-resume.sh
new file mode 100755
index 000
d a new good pack is put in $GIT_DIR.
Improvement point. We should be able to perform some heavy operations
locally before connecting to the server (e.g. produce the skip hash
from "blah", or index-pack consuming "blah").
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin
Signed-off-by: Nguyễn Thái Ngọc Duy
---
fetch-pack.c | 40
fetch-pack.h | 3 +++
2 files changed, 43 insertions(+)
diff --git a/fetch-pack.c b/fetch-pack.c
index 01e34b6..ffb5254 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -15,6 +15,7 @@
#include
A frankenstein pack, generated by multiple pack-objects runs,
certainly has higher risk of broken, especially when the server side
could be some other implementation than pack-objects. Be safe and
strict.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/index-pack.c | 2 ++
1 file changed, 2
the skipped part does not match, it can abort early.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/pack-objects.c | 21
csum-file.c| 52 ++
csum-file.h| 3 +++
3 files changed, 72 insertions(+), 4
client can pass it back on the
next fetch. Regardless, the input from client must be identical
between fetches, the server should be able to extract a signature from
that and use it to associate with a cached pack. So no need for
sending keys from the server side.
Signed-off-by: Nguyễn Thái Ngọc Du
In this mode (--append-pack --stdin), index-pack consumes current
content in first without producing anything else, then
continues to read from stdin and append to . This is the
consumer end of "pack-objects --skip".
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/index-p
Signed-off-by: Nguyễn Thái Ngọc Duy
---
grep.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/grep.c b/grep.c
index 7b2b96a..e739d20 100644
--- a/grep.c
+++ b/grep.c
@@ -403,9 +403,11 @@ static void compile_regexp(struct grep_pat *p, struct
grep_opt *opt)
p
-F means "no regex", not "case sensitive" so it should not override -i
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/grep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 5526fd7..4be0df5 100644
--- a/builtin/
v6 fixes comments from Ramsay and Eric. Interdiff below. The only
thing to add is, I decided not to replace !icase_non_ascii with
icase_ascii_only. I went with spelling out "!icase || ascii_only". I
think it expresses the intention better.
diff --git a/grep.c b/grep.c
index 2e4f71d..aed4fe0 100644
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
---
grep.c | 8 ++--
grep.h
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
---
grep.c | 2
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
---
gettext.c | 24 ++--
gettext.h | 1 +
2 files changed,
There's another regcomp code block coming in this function. By moving
the error handling code out of this block, we don't have to add the
same error handling code in the new block.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diffcore-pickaxe.c | 16
1 file changed, 8
Signed-off-by: Nguyễn Thái Ngọc Duy
---
test-regex.c | 51 +--
1 file changed, 49 insertions(+), 2 deletions(-)
diff --git a/test-regex.c b/test-regex.c
index 8c51f5a..d1a952c 100644
--- a/test-regex.c
+++ b/test-regex.c
@@ -1,4 +1,21 @@
#include
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
---
grep.c | 6 +-
t/t7812-grep-icase-non-ascii.sh (new +x) | 23 +++
2 files changed, 28
.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.
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
---
grep.c
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
---
t/t0070-fundamental.sh | 2 +-
test-regex.c | 12 ++--
2 files changed, 11 insertions(+), 3 deletions
Noticed-by: Ole Tange
Signed-off-by: Nguyễn Thái Ngọc Duy
---
On Sun, Feb 7, 2016 at 4:56 AM, Ole Tange wrote:
> If file name too long it should just try to see if it is a reference
> to a revision.
Looks easy enough to fix.
setup.c | 2 +-
1 file changed, 1 insertion(+), 1 de
re, if the check_filename() function encounters too long a
command-line parameter, it should interpet the error code ENAMETOOLONG
as a strong hint that this is not a file name instead of dying with an
error message.
Noticed-by: Ole Tange
Helped-by: Johannes Schindelin
Signed-off-by: Nguyễn Thá
Most of the time, get_git_common_dir() returns an absolute path so
prefix is irrelevant. If it returns a relative path (e.g. from the
main worktree) then prefixing is required.
Noticed-by: Mike Hommey
Signed-off-by: Nguyễn Thái Ngọc Duy
---
On Fri, Feb 12, 2016 at 10:47 AM, Mike Hommey wrote
;--bug"))
return test_regex_bug();
else if (argc < 3)
- die("usage: test-regex --bug\n"
- " test-regex []");
+ usage("test-regex --bug\n"
+ "test-regex []");
argv++;
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
---
t/t0070-fundamental.sh | 2 +-
test-regex.c | 12 ++--
2 files changed, 11 insertions(+), 3 deletions
-F means "no regex", not "case sensitive" so it should not override -i
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/grep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 8c516a9..46c5ba1 100644
--- a/builtin/
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
---
grep.c | 7 ++-
t/t7812-grep-icase-non-ascii.sh (new +x) | 23 +++
2 files changed, 29
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
---
grep.c | 8 ++--
grep.h
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
---
grep.c
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
---
gettext.c | 24 ++--
gettext.h | 1 +
2 files changed,
Signed-off-by: Nguyễn Thái Ngọc Duy
---
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-regex.c
@@ -1,4 +1,21 @@
#include
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
---
grep.c | 2
Signed-off-by: Nguyễn Thái Ngọc Duy
---
grep.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/grep.c b/grep.c
index 7b2b96a..609f218 100644
--- a/grep.c
+++ b/grep.c
@@ -403,7 +403,9 @@ static void compile_regexp(struct grep_pat *p, struct
grep_opt *opt)
p
There's another regcomp code block coming in this function. By moving
the error handling code out of this block, we don't have to add the
same error handling code in the new block.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diffcore-pickaxe.c | 16
1 file changed, 8
Signed-off-by: Nguyễn Thái Ngọc Duy
---
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
grep_opt *opt
.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.
cases I can imagine.
Nguyễn Thái Ngọc Duy (4):
dir.c: fix match_pathname()
dir.c: support tracing exclude
dir.c: support marking some patterns already matched
dir.c: don't exclude whole dir prematurely
Documentation/git-check-ignore.txt | 1 +
Documentation/gi
tched in this case
and fall back to fnmatch(), which also fails to catch it. Fix it.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dir.c b/dir.c
index f0b6d0a..bcaafac 100644
--- a/dir.c
+++ b/dir.c
@@ -878,7
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-check-ignore.txt | 1 +
Documentation/git.txt | 5 +
dir.c | 20
3 files changed, 26 insertions(+)
diff --git a/Documentation/git-check-ignore.txt
b/Documentation/git
we can mark it "sticky", so
that all files and dirs inside the matched path also matches. This is a
simpler solution than modify all match scenarios to fix that.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
dir.c | 77 ---
di
If there is a pattern "!foo/bar", this patch makes it not exclude
"foo" right away. This gives us a chance to examine "foo" and
re-include "foo/bar".
Helped-by: brian m. carlson
Helped-by: Micha Wiedenmann
Signed-off-by: Nguyễn Thái Ng
point of view. We do not need
the special case for -B.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Complete patch.
builtin/worktree.c | 4 +---
t/t2025-worktree-add.sh | 8
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
inde
e, we have already updated the branch and mess up the other
checkout.
Repeat the die_if_checked_out() test again for this specific case before
"git branch" runs.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Something extra while I was studying this code. I'm not so sure if
this is the right
Signed-off-by: Nguyễn Thái Ngọc Duy
---
usage.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/usage.c b/usage.c
index 82ff131..0dba0c5 100644
--- a/usage.c
+++ b/usage.c
@@ -109,19 +109,12 @@ void NORETURN die(const char *err, ...)
va_end
7; | cut -c 19-)"
__gitcomp "$list"
}
complete -o bashdefault -o default -o nospace -F _git_cw cw 2>/dev/null || \
complete -o default -o nospace -F _git_cw cw
-- 8< --
Nguyễn Thái Ngọc Duy (26):
usage.c: move format processing out of die_errno()
usage.c:
Signed-off-by: Nguyễn Thái Ngọc Duy
---
git-compat-util.h | 1 +
usage.c | 10 ++
2 files changed, 11 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index 693a336..fd1d374 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -408,6 +408,7 @@ extern
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 d24a8ae..cdb38d5 100644
--- a/copy.c
+++ b/copy.c
@@ -82,23 +82,16 @@ int FAST_FUNC
- selinux preservation code
- make-link code
- delete link dereference code
- non-recursive copy code
- stat no preservation code
- verbose printing code
Signed-off-by: Nguyễn Thái Ngọc Duy
---
copy.c | 101 +
1 file changed
This is busybox's unmodified copy_file() in libbb/copy_file.c from the
GPL2+ commit f2c043acfcf9dad9fd3d65821b81f89986bbe54e (busybox: fix
uninitialized memory when displaying IPv6 addresses - 2016-01-18)
Signed-off-by: Nguyễn Thái Ngọc Duy
---
copy.c
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
---
copy.c | 50 +-
1 file changed, 29 insertions(+), 21 deletions(-)
diff --git a/copy.c b/copy.c
index cdb38d5..00f8349 100644
--- a/copy.c
+++ b/copy.c
@@ -111,8 +111,10 @@ int FAST_FUNC copy_file(const char
Signed-off-by: Nguyễn Thái Ngọc Duy
---
cache.h | 3 +++
path.c | 29 +
2 files changed, 32 insertions(+)
diff --git a/cache.h b/cache.h
index 30a2708..04818c2 100644
--- a/cache.h
+++ b/cache.h
@@ -765,11 +765,14 @@ extern int check_repository_format(void
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 10 +-
builtin/worktree.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 62c76c1..1c9d7c1 100644
--- a
This is used later on to create empty .git/worktrees/xxx/locked when
"git worktree lock" is called with no reason given.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
wrapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrapper.c b/wrapper.c
index 29a45d2..1dc1
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 18 ++
worktree.h | 6 ++
2 files changed, 24 insertions(+)
diff --git a/worktree.c b/worktree.c
index 04aac73..facb907 100644
--- a/worktree.c
+++ b/worktree.c
@@ -219,6 +219,24 @@ int is_main_worktree(const struct
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 5 +
worktree.h | 5 +
2 files changed, 10 insertions(+)
diff --git a/worktree.c b/worktree.c
index e444ad1..e878f49 100644
--- a/worktree.c
+++ b/worktree.c
@@ -214,6 +214,11 @@ struct worktree *find_worktree_by_path(struct worktree
This function is later used by "worktree move" and "worktree remove"
to ensure that we have a good connection between the repository and
the worktree.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 63 ++
work
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index cfc848d..97666cc 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -263,7 +263,7 @@ static int add_worktree(const
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 16
worktree.h | 6 ++
2 files changed, 22 insertions(+)
diff --git a/worktree.c b/worktree.c
index b4e4b57..e444ad1 100644
--- a/worktree.c
+++ b/worktree.c
@@ -198,6 +198,22 @@ const char *get_worktree_git_dir(const
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 28195b1..04aac73 100644
--- a/worktree.c
+++ b/worktree.c
@@ -282,6 +282,31 @@ int validate_worktree(const
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 6 +++-
builtin/worktree.c | 60 ++
contrib/completion/git-completion.bash | 2 +-
t/t2028-worktree-move.sh | 29
4 files changed
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,
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 14 +++---
worktree.h | 5 +
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/worktree.c b/worktree.c
index 4c38414..b4e4b57 100644
--- a/worktree.c
+++ b/worktree.c
@@ -4,14 +4,22 @@
#include "workt
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 5 +
builtin/worktree.c | 31 +++
contrib/completion/git-completion.bash | 2 +-
t/t2028-worktree-move.sh | 14 ++
4 files changed, 51
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 97666cc..b261e11 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -332,7 +332,7 @@ static int add(int ac
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 22 +
builtin/worktree.c | 81 ++
contrib/completion/git-completion.bash | 5 ++-
t/t2028-worktree-move.sh | 26 +++
4 files changed
We can reconstruct git_dir from id quite easily. It's a bit hackier to
do the reverse.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 29 -
worktree.h | 7 ++-
2 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/worktree.c b/worktree.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 12 --
builtin/worktree.c | 41 ++
contrib/completion/git-completion.bash | 5 -
t/t2028-worktree-move.sh (new +x) | 34
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 2 +-
worktree.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 68341e4..cfc848d 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -94,7 +94,7
Signed-off-by: Nguyễn Thái Ngọc Duy
---
contrib/completion/git-completion.bash | 23 +++
1 file changed, 23 insertions(+)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 45ec47f..099d52e 100644
--- a/contrib/completion/git
ual command call. But nothing
> unfeasible.
We do want to turn all these scripts to C in the end, regardless if
the conversion is part of any GSoC. So I dug up my code and prepared
this. Now we need people to convert any git-rebase*.sh to C :)
Nguyễn Thái Ngọc Duy (3):
rebase: move common
These functions are used by git-rebase--*.sh, which will be made
separate programs later. At that point, we can reinclude rebase--lib.sh
to provide the functions without duplicating code.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Makefile | 1 +
git-rebase--lib.sh (new) | 41
Signed-off-by: Nguyễn Thái Ngọc Duy
---
git-rebase--lib.sh (mode +x) | 38 ++
git-rebase.sh| 37 +
2 files changed, 39 insertions(+), 36 deletions(-)
mode change 100644 => 100755 git-rebase--lib.sh
d
This is the first step of turning any of these scripts into C. We can
see now what variables are exchanged between git-rebase.sh and the
subscript (but we don't see all in this patch, variables may have been
exported earlier in git-rebase.sh)
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Mak
tconv(). Correct all call sites.
Changes in combine-diff.c are not clear from diff output. We need to
force not running fill_textconv() unless the function returns a new
buffer so that it falls to the "else" case and allocates a new buffer
with no conversion.
Signed-off-by: Nguyễ
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/diff.c b/diff.c
index 8b3a3db..5bdc3c0 100644
--- a/diff.c
+++ b/diff.c
@@ -717,8 +717,8 @@ static void emit_rewrite_diff(const char *name_a,
ecbdata.opt = o;
if
ot
be used together");
+ die("git upload-pack: deepen and deepen-since (or deepen-not)
cannot be used together");
if (depth > 0)
deepen(depth, deepen_relative, &shallows);
else if (deepen_rev_list) {
@@ -801,16 +821,17 @@ static void r
For now we can handle two types, string and boolean, in
set_helper_option(). Later on we'll add string_list support, which does
not fit well. The new function strbuf_set_helper_option() can be reused
for a separate function that handles string-list.
Signed-off-by: Nguyễn Thái Ngọ
Signed-off-by: Nguyễn Thái Ngọc Duy
---
upload-pack.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 97ed620..0eb9a0b 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -538,6 +538,20 @@ error
Signed-off-by: Nguyễn Thái Ngọc Duy
---
remote-curl.c | 40 +---
1 file changed, 17 insertions(+), 23 deletions(-)
diff --git a/remote-curl.c b/remote-curl.c
index c704857..4289c20 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -726,37 +726,30 @@ static
This is a prep step for further refactoring. Besides reindentation and
s/shallows\./shallows->/g, no other changes are expected.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
upload-pack.c | 99 +++
1 file changed, 52 insertions(+), 47 deleti
Signed-off-by: Nguyễn Thái Ngọc Duy
---
upload-pack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 257ad48..9f14933 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -641,9 +641,9 @@ static void receive_needs(void
After the last patch, "result" and "backup" are the same. "result" used
to move, but the movement is now contained in send_shallow(). Delete
this redundant variable.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
upload-pack.c | 9 -
1 file changed, 4 insertions(
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/fetch-pack.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 9b2a514..8332d3d 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -59,12 +59,12 @@ int
Signed-off-by: Nguyễn Thái Ngọc Duy
---
upload-pack.c | 44 +---
1 file changed, 25 insertions(+), 19 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 9f14933..c8dafe8 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -451,7 +451,7 @@ static
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/fetch-options.txt | 5 +
Documentation/git-fetch-pack.txt| 5 +
Documentation/gitremote-helpers.txt | 4
builtin/fetch-pack.c| 7 +++
builtin/fetch.c | 21
This is basically dwim_ref() without @{} support. To be used on the
server side where we want to expand abbreviated to full ref names and
nothing else. The first user is "git clone/fetch --shallow-exclude".
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 8 +++-
refs.h | 1
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-clone.txt | 5 +
builtin/clone.c | 18 +-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index a410409..5049663 100644
--- a
But deepen-not
can be mixed with deepen-since. The result is exactly how you do the
command "git rev-list --since=... --not ref".
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/technical/pack-protocol.txt | 3 ++-
Documentation/technical/protocol-capabilities.txt | 9
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/fetch-options.txt | 4
Documentation/git-fetch-pack.txt| 4
Documentation/gitremote-helpers.txt | 3 +++
builtin/fetch-pack.c| 4
builtin/fetch.c | 29
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t5500-fetch-pack.sh | 22 ++
t/t5539-fetch-http-shallow.sh | 22 ++
2 files changed, 44 insertions(+)
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 26f050d..a3fe5ca 100755
--- a/t/t5500
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t5500-fetch-pack.sh | 24
t/t5539-fetch-http-shallow.sh | 26 ++
2 files changed, 50 insertions(+)
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index e5f83bf..26f050d 100755
--- a/t
701 - 800 of 5892 matches
Mail list logo