This keeps top dir a bit less crowded. And because these programs are
for testing purposes, it makes sense that they stay somewhere in t/
Signed-off-by: Nguyễn Thái Ngọc Duy
---
This patch will break any patches that add new test programs.
Luckily, none in 'next' or 'pu' do
First cut. I need opinions on 05/07, which converts
wt_status_get_state() to support selecting any worktree. I'm not super
happy with leaving "TODO: not supported yet" comments, even though
strictly speaking this series does not need it.
The reason it's left unsupported is, in order to add
worktre
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 | 31 ++-
worktree.h | 8 +++-
2 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/worktree.c b/workt
functions will enable that.
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 2711048..c04a17f 100644
--- a/cache.h
+++ b/cache.h
@@ -799,11 +799,14 @@ extern void
,
wt_status_get_state() will be converted using this to take
am/rebase/... state of any worktree.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
path.c | 34 --
worktree.h | 11 +++
2 files changed, 39 insertions(+), 6 deletions(-)
diff --git a/path.c b/path.c
index
These are a variant of git_path_..._head(), defined with GIT_PATH_FUNC
macro but they takes worktree into account. To be used when
wt_status_get_state() is converted to be worktree-aware.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 4
worktree.h | 13 +
2 files
thing like worktree_get_sha1), cherry-pick and revert
detection will not work when the examined worktree is not the current
one. The same for get_detached_from.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
wt-status.c | 42 +-
wt-status.h | 3 +++
2 files changed, 28 inserti
. This is because
unlike rebase, bisect does not update the branch. Yes it's still a bit
confusing when the user doing the bisecting realizes that the branch is
updated elsewhere, but at least we do not lose any valuable ref update.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/worktree.c b/worktree.c
index c5bf583..3b7c6f2 100644
--- a/worktree.c
+++ b/worktree.c
@@ -200,10 +200,12 @@ char *find_shared_symref(const char *symref, const char
, changed mask
= 2
trace.c:420 performance: 0.048365509 s: git command: './git'
'status'
Signed-off-by: Nguyễn Thái Ngọc Duy
---
This is worth merging, I think.
diff-lib.c | 4
dir.c| 2 ++
name-hash.c | 2 ++
preload-index.
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
---
branch.c | 3 ++-
worktree.c | 31 ++-
worktree.h | 8 +++-
3 files changed, 27 insertions(+), 15 deletions(-)
diff --
Much happier with this version. This makes
- git checkout refuse if a branch is under rebase or bisect
elsewhere
- git worktree add refuse if a branch is under rebase or bisect
- git branch -D refuse if a branch is under rebase or bisect.
This applies for single worktree case as well.
functions will enable that.
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 2711048..c04a17f 100644
--- a/cache.h
+++ b/cache.h
@@ -799,11 +799,14 @@ extern void
And make it work with any given worktree, in preparation for (again)
find_shared_symref(). read_and_strip_branch() is deleted because it's
no longer used.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
wt-status.c | 23 ++-
wt-status.h | 2 ++
2 files changed, 16 insertions(
d_symref() will prevent
that and "git rebase --abort" will fail as a result.
find_shared_symref() and die_if_checked_out() have to learn a new
option ignore_current_worktree to loose the test a bit.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
branch.c| 4 ++--
branch.h
,
wt_status_get_state() will be converted using this to take
am/rebase/... state of any worktree.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
path.c | 34 --
worktree.h | 11 +++
2 files changed, 39 insertions(+), 6 deletions(-)
diff --git a/path.c b/path.c
index
worktree.c:find_shared_symref() later needs to know if a branch is being
rebased, and only rebased only. Split this code so it can be used
independently from other in-progress tests.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
wt-status.c | 23 +--
wt-status.h | 1 +
2 files
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 18 +-
worktree.h | 1 +
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/worktree.c b/worktree.c
index 360ba41..452f64a 100644
--- a/worktree.c
+++ b/worktree.c
@@ -2,6 +2,7 @@
#include "refs.h"
This is a preparation step for find_shared_symref() to detect if any
worktree is being rebased.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
wt-status.c | 33 -
wt-status.h | 5 -
2 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/wt-status.c b/wt
isect will
fail to return to the (long gone) branch
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t2025-worktree-add.sh | 13 +
worktree.c | 19 +++
2 files changed, 32 insertions(+)
diff --git a/t/t2025-worktree-add.sh b/t/t2025-worktree-add.sh
index da5432
s a lot more work.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/branch.c| 25 +
t/t2025-worktree-add.sh | 8
worktree.c | 8
worktree.h | 3 +++
4 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/built
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/worktree.c b/worktree.c
index 452f64a..b5ca78f 100644
--- a/worktree.c
+++ b/worktree.c
@@ -221,10 +221,12 @@ const struct worktree *find_shared_symref(const char
*symref
This gives the caller more information and they can answer things like,
"is it the main worktree" or "is it the current worktree". The latter
question is needed for the "checkout a rebase branch" case later.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
branch.c
Its last call site was replaced by mks_tempfile_ts() in 284098f (diff:
use tempfile module - 2015-08-12) and there's a good chance
mks_tempfile_ts will continue to successfully handle this job. Delete
it.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
cache.h | 2 --
wrapper.c
It was largely replaced by fnmatch_icase_mem() and its last use was in
84b8b5d (remove match_pathspec() in favor of match_pathspec_depth() -
2013-07-14).
Signed-off-by: Nguyễn Thái Ngọc Duy
---
dir.c | 7 ---
dir.h | 1 -
2 files changed, 8 deletions(-)
diff --git a/dir.c b/dir.c
index
v3 fixes all the things found in v2, deletes unused stuff and adds a
new patch 01/13 that renames str(n)cmp_icase to fspath(n)cmp.
Interdiff
diff --git a/branch.c b/branch.c
index 8e323d3..a5a8dcb 100644
--- a/branch.c
+++ b/branch.c
@@ -338,12 +338,12 @@ void die_if_checked_out(const char *branc
These functions compare two paths that are taken from file system.
Depending on the running file system, paths may need to be compared
case-sensitively or not, and maybe even something else in future. The
current names do not convey that well.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
dir.c
functions will enable that.
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 2711048..c04a17f 100644
--- a/cache.h
+++ b/cache.h
@@ -799,11 +799,14 @@ extern void
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 24
worktree.h | 1 +
2 files changed, 25 insertions(+)
diff --git a/worktree.c b/worktree.c
index 360ba41..dc092a7 100644
--- a/worktree.c
+++ b/worktree.c
@@ -2,6 +2,7 @@
#include "refs.h"
#include
worktree.c:find_shared_symref() later needs to know if a branch is being
rebased, and only rebase, no cherry-pick, do detached branch... Split
this code so it can be used independently from other in-progress tests.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
wt-status.c | 23
This gives the caller more information and they can answer things like,
"is it the main worktree" or "is it the current worktree". The latter
question is needed for the "checkout a rebase branch" case later.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
branch.c
,
wt_status_get_state() will be converted using this to take
am/rebase/... state of any worktree.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
path.c | 24 ++--
worktree.h | 8
2 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/path.c b/path.c
index 2ebb23d..8fdd187
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
---
branch.c | 3 ++-
worktree.c | 31 ++-
worktree.h | 8 +++-
3 files changed, 27 insertions(+), 15 deletions(-)
diff --
This is a preparation step for find_shared_symref() to detect if any
worktree is being rebased.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
wt-status.c | 33 -
wt-status.h | 5 -
2 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/wt-status.c b/wt
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/worktree.c b/worktree.c
index dc092a7..927905b 100644
--- a/worktree.c
+++ b/worktree.c
@@ -229,10 +229,12 @@ const struct worktree *find_shared_symref(const char
*symref
d_shared_symref() will prevent
that and "git rebase --abort" will fail as a result.
find_shared_symref() and die_if_checked_out() have to learn a new
option ignore_current_worktree to loosen the test a bit.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
branch.c| 4 ++--
branch.h
And make it work with any given worktree, in preparation for (again)
find_shared_symref(). read_and_strip_branch() is deleted because it's
no longer used.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
wt-status.c | 23 ++-
wt-status.h | 2 ++
2 files changed, 16 insertions(
isect will
fail to return to the (long gone) branch
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t2025-worktree-add.sh | 13 +
worktree.c | 19 +++
2 files changed, 32 insertions(+)
diff --git a/t/t2025-worktree-add.sh b/t/t2025-worktree-add.sh
index da5432
s a lot more work.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/branch.c| 25 +
t/t2025-worktree-add.sh | 8
worktree.c | 8
worktree.h | 3 +++
4 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/built
refs/files-backend.c untouched because they are
currently hot zones.
Nguyễn Thái Ngọc Duy (41):
usage.c: move format processing out of die_errno()
usage.c: add warning_errno() and error_errno()
bisect.c: use die_errno() and warning_errno()
builtin/am.c: use error_errno()
builtin/branch.c
Similar to die_errno(), these functions will append strerror()
automatically.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
git-compat-util.h | 2 ++
usage.c | 19 +++
2 files changed, 21 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index 1f8b5f3
fmt_with_err() will be shared with the coming error_errno() and
warning_errno().
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
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/branch.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 0adba62..6f1572d 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -593,8 +593,7 @@ static int edit_branch_description
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/am.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index d003939..3dfe70b 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -769,15 +769,15 @@ static int split_mail_conv(mail_conv_fn fn
Signed-off-by: Nguyễn Thái Ngọc Duy
---
bisect.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/bisect.c b/bisect.c
index 7996c29..6d93edb 100644
--- a/bisect.c
+++ b/bisect.c
@@ -860,8 +860,8 @@ static void check_good_are_ancestors_of_bad(const char
*prefix, int
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/pack-objects.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index a27de5b..e18e190 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -828,8 +828,7
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/merge-file.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index 5544705..13e22a2 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -62,8 +62,7 @@ int
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/fetch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index f8455bd..1582ca7 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -607,7 +607,7 @@ static int store_updated_refs(const char
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/help.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/help.c b/builtin/help.c
index 3c55ce4..8848013 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -127,7 +127,7 @@ static void exec_woman_emacs(const char
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/rm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/rm.c b/builtin/rm.c
index 8829b09..13b9639 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -152,7 +152,7 @@ static int check_local_mod(unsigned char *head, int
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/mailsplit.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c
index 104277a..4859ede 100644
--- a/builtin/mailsplit.c
+++ b/builtin/mailsplit.c
@@ -109,7 +109,7 @@ static int
Signed-off-by: Nguyễn Thái Ngọc Duy
---
connected.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/connected.c b/connected.c
index 299c560..bf1b12e 100644
--- a/connected.c
+++ b/connected.c
@@ -86,17 +86,14 @@ static int check_everything_connected_real
Signed-off-by: Nguyễn Thái Ngọc Duy
---
combine-diff.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/combine-diff.c b/combine-diff.c
index 0e1d4b0..8f2313d 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -1005,8 +1005,7 @@ static void show_patch_diff(struct
Signed-off-by: Nguyễn Thái Ngọc Duy
---
copy.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/copy.c b/copy.c
index 574fa1f..4de6a11 100644
--- a/copy.c
+++ b/copy.c
@@ -42,15 +42,15 @@ int copy_file(const char *dst, const char *src, int mode)
status = copy_fd
Signed-off-by: Nguyễn Thái Ngọc Duy
---
entry.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/entry.c b/entry.c
index a410957..519e042 100644
--- a/entry.c
+++ b/entry.c
@@ -168,8 +168,8 @@ static int write_entry(struct cache_entry *ce
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 d8e3795..331ecf6 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -110,7 +110,7 @@ static void prune_worktrees
"err" is deleted because it just causes confusion when "errno" is also
used directly in process_lstat_error().
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/update-index.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/update-inde
Signed-off-by: Nguyễn Thái Ngọc Duy
---
check-racy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/check-racy.c b/check-racy.c
index 00d92a1..24b6542 100644
--- a/check-racy.c
+++ b/check-racy.c
@@ -12,7 +12,7 @@ int main(int ac, char **av)
struct stat st
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diff-no-index.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/diff-no-index.c b/diff-no-index.c
index 03daadb..1f8999b 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -65,8 +65,7 @@ static int populate_from_stdin(struct
Signed-off-by: Nguyễn Thái Ngọc Duy
---
credential-cache--daemon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c
index 291c0fd..1f14d56 100644
--- a/credential-cache--daemon.c
+++ b/credential-cache--daemon.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/upload-archive.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/upload-archive.c b/builtin/upload-archive.c
index dbfe14f..2caedf1 100644
--- a/builtin/upload-archive.c
+++ b/builtin/upload-archive.c
@@ -104,8 +104,7
Signed-off-by: Nguyễn Thái Ngọc Duy
---
compat/win32/syslog.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/compat/win32/syslog.c b/compat/win32/syslog.c
index b905aea..1c2ae18 100644
--- a/compat/win32/syslog.c
+++ b/compat/win32/syslog.c
@@ -28,13 +28,13 @@ void
Signed-off-by: Nguyễn Thái Ngọc Duy
---
config.c | 22 +-
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/config.c b/config.c
index 10b5c95..80411e4 100644
--- a/config.c
+++ b/config.c
@@ -2012,7 +2012,7 @@ int git_config_set_multivar_in_file_gently(const char
Signed-off-by: Nguyễn Thái Ngọc Duy
---
editor.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/editor.c b/editor.c
index 01c644c..7519ede 100644
--- a/editor.c
+++ b/editor.c
@@ -63,7 +63,6 @@ int launch_editor(const char *path, struct strbuf *buffer,
const char *const
Signed-off-by: Nguyễn Thái Ngọc Duy
---
http.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/http.c b/http.c
index 4304b80..7565c93 100644
--- a/http.c
+++ b/http.c
@@ -446,8 +446,7 @@ static int sockopt_callback(void *client, curl_socket_t fd,
curlsocktype type
Signed-off-by: Nguyễn Thái Ngọc Duy
---
gpg-interface.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gpg-interface.c b/gpg-interface.c
index 2259938..c4b1e8c 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -219,11 +219,9 @@ int verify_signed_buffer(const char
Signed-off-by: Nguyễn Thái Ngọc Duy
---
grep.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grep.c b/grep.c
index 528b652..87c1890 100644
--- a/grep.c
+++ b/grep.c
@@ -1732,7 +1732,7 @@ static int grep_source_load_file(struct grep_source *gs)
if (lstat(filename
Signed-off-by: Nguyễn Thái Ngọc Duy
---
fast-import.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index 9fc7093..21881d1 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -414,7 +414,7 @@ static void write_crash_report(const char
Signed-off-by: Nguyễn Thái Ngọc Duy
---
run-command.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/run-command.c b/run-command.c
index e4593cd..842c8d1 100644
--- a/run-command.c
+++ b/run-command.c
@@ -233,7 +233,7 @@ static int wait_or_whine(pid_t pid
Signed-off-by: Nguyễn Thái Ngọc Duy
---
rerere.c | 18 +++---
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/rerere.c b/rerere.c
index c8b9f40..1810c04 100644
--- a/rerere.c
+++ b/rerere.c
@@ -501,8 +501,7 @@ static int handle_file(const char *path, unsigned char
Signed-off-by: Nguyễn Thái Ngọc Duy
---
mailmap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mailmap.c b/mailmap.c
index 9726237..b5c521f 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -189,8 +189,7 @@ static int read_mailmap_file(struct string_list *map, const
char
Signed-off-by: Nguyễn Thái Ngọc Duy
---
ident.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/ident.c b/ident.c
index 4fd82d1..139c528 100644
--- a/ident.c
+++ b/ident.c
@@ -75,14 +75,12 @@ static int add_mailname_host(struct strbuf *buf)
mailname = fopen
Signed-off-by: Nguyễn Thái Ngọc Duy
---
reachable.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/reachable.c b/reachable.c
index ed35201..d0199ca 100644
--- a/reachable.c
+++ b/reachable.c
@@ -119,8 +119,7 @@ static int add_recent_loose(const unsigned char *sha1
Signed-off-by: Nguyễn Thái Ngọc Duy
---
sequencer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index e66f2fe..4687ad4 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -875,8 +875,7 @@ static int sequencer_rollback(struct replay_opts *opts
Signed-off-by: Nguyễn Thái Ngọc Duy
---
transport-helper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/transport-helper.c b/transport-helper.c
index b934183..f09fadc 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -1166,7 +1166,7 @@ static int
Signed-off-by: Nguyễn Thái Ngọc Duy
---
server-info.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server-info.c b/server-info.c
index 5a86e29..75dd677 100644
--- a/server-info.c
+++ b/server-info.c
@@ -36,7 +36,7 @@ static int update_info_file(char *path, int (*generate
Signed-off-by: Nguyễn Thái Ngọc Duy
---
wrapper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wrapper.c b/wrapper.c
index 9afc1a0..3df2fe0 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -572,7 +572,7 @@ static int warn_if_unremovable(const char *op, const char
*file, int
Signed-off-by: Nguyễn Thái Ngọc Duy
---
unpack-trees.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index 9f55cc2..bb0d142 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1499,8 +1499,7 @@ static int verify_absent_1(const struct
Signed-off-by: Nguyễn Thái Ngọc Duy
---
sha1_file.c | 32 +---
1 file changed, 13 insertions(+), 19 deletions(-)
diff --git a/sha1_file.c b/sha1_file.c
index d0f2aa0..a7f45b3 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1107,9 +1107,8 @@ unsigned char *use_pack
Signed-off-by: Nguyễn Thái Ngọc Duy
---
vcs-svn/line_buffer.c| 4 ++--
vcs-svn/sliding_window.c | 2 +-
vcs-svn/svndiff.c| 4 ++--
vcs-svn/svndump.c| 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/vcs-svn/line_buffer.c b/vcs-svn/line_buffer.c
index
Signed-off-by: Nguyễn Thái Ngọc Duy
---
upload-pack.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index dc802a0..f19444d 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -174,8 +174,7 @@ static void create_pack_file(void
sh may have
more than one plural form.
Reported-by: Alfonsogonzalez, Ernesto (GE Digital)
Signed-off-by: Nguyễn Thái Ngọc Duy
---
remote.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/remote.c b/remote.c
index 28fd676..212426e 100644
--- a/remote.c
+++ b/remote.c
trace_stats() is intended for GIT_TRACE_*_STATS variable group and
GIT_TRACE_PACK_STATS is more like an example how new vars can be added.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git.txt | 3 +++
cache.h | 2 ++
git.c | 1 +
sha1_file.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
read-cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/read-cache.c b/read-cache.c
index 84616c8..a76c789 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1345,7 +1345,7 @@ struct ondisk_cache_entry_extended
This allows signal handlers and atexit functions to realize this
situation and not clean up.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/gc.c | 2 +-
cache.h | 2 +-
daemon.c | 2 +-
setup.c | 4 +++-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/builtin/gc.c
storing it in headers would cause more problems with munmap,
storing it as a separate shm is even worse).
PostMessage is used instead of UNIX signals for
notification. Lightweight (at least code-wise) on the client side.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
config.mak.uname | 2 ++
inde
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-index-helper.txt | 3 +++
index-helper.c | 10 --
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-index-helper.txt
b/Documentation/git-index-helper.txt
index ad40366..9ced091
Signed-off-by: Nguyễn Thái Ngọc Duy
---
cache.h | 3 +++
read-cache.c | 13 -
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/cache.h b/cache.h
index 8791dbc..89e9aaf 100644
--- a/cache.h
+++ b/cache.h
@@ -311,11 +311,14 @@ struct index_state {
struct
t shared memory. --strict is added to avoid that
Strictly speaking there's still a very small gap where corrupt shared
memory could still be read by git: after we write the trailing SHA-1 in
the shared memory (thus signaling "this shm is ready") and before
verify_shm() detects an error.
S
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git.txt | 1 +
cache.h | 1 +
read-cache.c | 16
trace.c | 5 -
4 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index
refresh time. To be posted shortly after this.
[0] http://mid.gmane.org/1406548995-28549-1-git-send-email-pclo...@gmail.com
[2] http://github.com/pclouds/git/commits/index-helper
Nguyễn Thái Ngọc Duy (9):
trace.c: add GIT_TRACE_PACK_STATS for pack usage statistics
read-cache.c: fix constness of
ex-helper. It makes
sense as v4 requires more processing after loading the index:
(vanilla) 0.72249 s: read_index_from .git/index
(index-helper) 0.302741500 s: read_index_from .git/index
Signed-off-by: Nguyễn Thái Ngọc Duy
---
.gitignore | 1
remaining piece is killing lstat() from
untracked cache, but right now it's just some idea and incomplete
code.
[1] https://github.com/pclouds/git/commits/refresh-with-watchman
[2] https://github.com/facebook/watchman/issues/19
Nguyễn Thái Ngọc Duy (5):
read-cache: add watchman 'WAMA'
'skipping refresh' bit is not in this patch yet as we would need
watchman. More details in later patches.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
cache.h | 4
read-cache.c | 71 ++--
2 files changed, 73 insertions(+), 2
ex-helper is, when used with
untracked cache, we need to keep track of $GIT_WORK_TREE file
listing. That kind of list can be kept in index-helper.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Makefile | 5
cache.h| 2 ++
index-helper.c | 84 +
If index-helper puts 'W' before pid in $GIT_DIR/index-helper.pid, then
git will sleep for a while, expecting to be waken up by SIGUSR1 when
index-helper has done shm preparation, or after the timeout.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
read-cache.c | 14 --
1 file c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/update-index.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 7431938..86aec21 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -903,6 +903,7 @@ int
g it a bit.
[1] http://article.gmane.org/gmane.comp.version-control.git/248006
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Makefile | 7 +++
cache.h | 1 +
config.c | 5 +++
configure.ac | 8
environment.c| 3 ++
wat
i->use_scissors.
This is caught by t4150.20. git_mailinfo_config() breaks
mi->name.alloc and makes strbuf_release() in clear_mailinfo() attempt
to free strbuf_slopbuf.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
mailinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mailinfo.
file, which is an
indication this is a linked worktree.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
setup.c| 2 +-
t/t0002-gitfile.sh | 7 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/setup.c b/setup.c
index d343725..b30d923 100644
--- a/setup.c
+++ b/setup.c
@@ -
901 - 1000 of 5892 matches
Mail list logo