With get_main_ref_store() being used inside get_ref_store(),
lookup_ref_store() is only used for submodule code path. Rename to
reflect that and delete dead code.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a
x.org/git/%3c20170216120302.5302-1-pclo...@gmail.com%3E/
[2] https://github.com/pclouds/git/commits/prune-in-worktrees-2
Nguyễn Thái Ngọc Duy (15):
revision.h: new flag in struct rev_info wrt. worktree-related refs
revision.c: refactor add_index_objects_to_pending()
revision.c: --inde
-worktree.
The flag will eventually be exposed as a rev-list argument with
documents. For now it stays internal until the new behavior is fully
implemented.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
revision.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/revision.h b/revision.h
index 9fac1a607
This is a better place that will benefit all submodule callers instead
of just resolve_gitlink_ref()
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 38 --
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/refs.c b/refs.c
index 23e0a8eda
The core code is factored out and take 'struct index_state *' instead so
that we can reuse it to add objects from index files other than .git/index
in the next patch.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
revision.c | 18 --
1 file changed, 12 insertions(+), 6
Signed-off-by: Nguyễn Thái Ngọc Duy
---
revision.c | 21 +
t/t5304-prune.sh | 9 +
2 files changed, 30 insertions(+)
diff --git a/revision.c b/revision.c
index ece868a25..d82f72ff3 100644
--- a/revision.c
+++ b/revision.c
@@ -19,6 +19,7 @@
#include "dir
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 19 +--
refs.h | 1 +
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/refs.c b/refs.c
index 06890db5d..26758b8cf 100644
--- a/refs.c
+++ b/refs.c
@@ -1139,27 +1139,26 @@ int rename_ref_available(const char
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 33 ++---
refs.h | 1 +
2 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/refs.c b/refs.c
index 26758b8cf..fc6cca3db 100644
--- a/refs.c
+++ b/refs.c
@@ -1170,10 +1170,9 @@ int head_ref(each_ref_fn fn
These are used in revision.c. After the last patch they are replaced
with the refs_ version. Delete them (except for_each_remote_ref_submodule
which is still used by submodule.c)
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 30 --
refs.h | 9 -
2 files
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 19 ---
refs.h | 5 +
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/refs.c b/refs.c
index 9c86c44b8..06890db5d 100644
--- a/refs.c
+++ b/refs.c
@@ -186,16 +186,29 @@ struct ref_filter {
void *cb_data
separate topic to reduce the scope of this one.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
reachable.c | 1 +
refs.c | 22 ++
refs.h | 1 +
revision.c | 13 +
submodule.c | 2 ++
t/t5304-prune.sh | 12
6 fi
Signed-off-by: Nguyễn Thái Ngọc Duy
---
revision.c | 48
1 file changed, 32 insertions(+), 16 deletions(-)
diff --git a/revision.c b/revision.c
index d82f72ff3..d82c37b44 100644
--- a/revision.c
+++ b/revision.c
@@ -1189,12 +1189,19 @@ void
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 39 +++
refs.h | 5 +
2 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/refs.c b/refs.c
index fc6cca3db..37b03d4ff 100644
--- a/refs.c
+++ b/refs.c
@@ -300,34 +300,52 @@ void
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 24 +++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 011a7e256..d429f8713 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3314,6
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 19 ++-
refs.h | 3 +++
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/refs.c b/refs.c
index ce165c0ea..622c6b669 100644
--- a/refs.c
+++ b/refs.c
@@ -1592,9 +1592,8 @@ int verify_refname_available(const char
rm we should be able to obtain a "per-worktree only"
ref store and would need to revert the changes in reflog iteration
API. So let's just wait until then.
add_reflogs_to_pending() is called by reachable.c so by default "git
prune" will examine reflog from all worktre
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/rev-list-options.txt | 8
revision.c | 2 ++
2 files changed, 10 insertions(+)
diff --git a/Documentation/rev-list-options.txt
b/Documentation/rev-list-options.txt
index 5da7cf5a8..dd773f97c 100644
--- a
have to worry about memory management again.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 146 ---
1 file changed, 115 insertions(+), 31 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 1ebd59ec0..c6c86f8
treating both per-worktree and pseudo as
per-worktree in files_path() only and keep classification unchanged.
Side note, my other two series seem to apply cleanly on top of this
v3, so no resend.
Nguyễn Thái Ngọc Duy (15):
refs-internal.c: make files_log_ref_write() static
files-backend: convert
Created in 5f3c3a4e6f (files_log_ref_write: new function - 2015-11-10)
but probably never used outside refs-internal.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 3 +++
refs/refs-internal.h | 4
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/refs/files
f_store' should be replaced by "gitdir". And a
compound ref_store is created to combine two files backends together,
one represents the shared refs in $GIT_COMMON_DIR, one per-worktree. At
that point, files_path() becomes a wrapper of strbuf_vaddf().
Signed-off-by: Nguyễn Thái Ngọc
files-backend.c (probably should not exist in the first place). But
we'll leave it there until we have better multi-worktree support in refs
before we update it.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 208 +++
1 file ch
le() still does path
translation underneath. But that's for another patch.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 37 +
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/refs.c b/refs.c
index c6af84357..c3bdc99d8 100644
--- a/refs.c
+++ b/refs.c
@@ -1450,15 +1450,23 @@ static struct ref_store *ref_store_init(const char
*submodule
With get_main_ref_store() being used inside get_ref_store(),
lookup_ref_store() is only used for submodule code path. Rename to
reflect that and delete dead code.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a
This helps the future changes in this code. And because get_ref_store()
is destined to become get_submodule_ref_store(), the "get main store"
code path will be removed eventually. After this the patch to delete
that code will be cleaner.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
r
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 6 --
refs/refs-internal.h | 6 ++
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c
index 81b64b4ed..c6af84357 100644
--- a/refs.c
+++ b/refs.c
@@ -489,12 +489,6 @@ int dwim_log(const char *str
This is the last function in this code (besides public API) that takes
submodule argument and handles both main/submodule cases. Break it down,
move main store registration in get_main_ref_store() and keep the rest
in register_submodule_ref_store().
Signed-off-by: Nguyễn Thái Ngọc Duy
refs is learning to avoid path rewriting that is done by
strbuf_git_path_submodule(). Factor out this code so it could be reused
by refs*
Signed-off-by: Nguyễn Thái Ngọc Duy
---
path.c | 34 +++---
submodule.c | 31 +++
submodule.h
true...
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 70
1 file changed, 21 insertions(+), 49 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 529c80af1..b8ccf4e47 100644
--- a/refs/files-backend.c
get_ref_store() will soon be renamed to get_submodule_ref_store().
Together with future get_worktree_ref_store(), the three functions
provide an appropriate ref store for different operation modes. New APIs
will be added to operate directly on ref stores.
Signed-off-by: Nguyễn Thái Ngọc Duy
submodules since we
don't convert submodule path to gitdir at every backend call like
before. We pay that once at ref-store creation.
More cleanup in files_downcast() follows shortly. It's separate to keep
noises from this patch.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c
This function is intended to replace *_submodule() refs API. It provides
a ref store for a specific submodule, which can be operated on by a new
set of refs API.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.c | 12
refs.h | 11 +++
refs/files
Created in 5f3c3a4e6f (files_log_ref_write: new function - 2015-11-10)
but probably never used outside refs-internal.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 3 +++
refs/refs-internal.h | 4
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/refs/files
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs.h | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/refs.h b/refs.h
index 9fbff90e7..c494b641a 100644
--- a/refs.h
+++ b/refs.h
@@ -1,6 +1,11 @@
#ifndef REFS_H
#define REFS_H
+struct object_id;
+struct ref_transaction
, if you take this on 'pu', you'll have to kick my other two
series out (they should not even compile). I'm not resending them
until I get a "looks mostly ok" from Michael. No point in updating
them when this series keeps moving.
This series is also available on my gi
_submodule() still does path
translation underneath. But that's for another patch.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 43 ++-
1 file changed, 38 insertions(+), 5 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-
have to worry about memory management again.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 139 +++
1 file changed, 106 insertions(+), 33 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 4676525de..435db12
Keep repo-related path handling in one place. This will make it easier
to add submodule/multiworktree support later.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 148 +++
1 file changed, 89 insertions(+), 59 deletions(-)
diff
y. Not yet.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
refs/files-backend.c | 45 +
1 file changed, 25 insertions(+), 20 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 7b4ea4c56..72f4e1746 100644
--- a/refs/files-backend.c
+++ b/
more
natural to keep cwd where it is.
We have a way to do that now after 441981b (git: simplify environment
save/restore logic - 2016-01-26). It's just a matter of choosing the
right syntax. I'm going with '!!'. I'm not very happy with it. But I
do like this type of ali
could be diff-cached-ignores-ita, but
that's just half of what it does. The other half is diff-files-includes-ita...
Nguyễn Thái Ngọc Duy (4):
Subject: diff-lib: allow ita entries treated as "not yet exist in index"
diff: add --ita-[in]visible-in-index
commit: fix empty commi
ita entries are dropped at tree generation phase. If the entire index
consists of just ita entries, the result would be a a commit with no
entries, which should be caught unless --allow-empty is specified. The
test "!!active_nr" is not sufficient to catch this.
Signed-off-by: Nguyễn Thá
ent
commit.
index_differs_from() is supposed to catch this so we can abort
git-commit (unless --no-empty is specified). Update it to optionally
ignore i-t-a entries when doing a diff between the index and HEAD so
that it would return "no change" in this case and abort commit.
Signed-off-by: Nguyễn Thái Ng
ask it, while making sure other unaudited callers will get
the same comparison result.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diff-lib.c | 14 ++
diff.h | 1 +
t/t2203-add-intent.sh | 16 +++-
t/t7064-wtstatus-pv2.sh | 4 ++--
wt-stat
, but a bunch other commands like
'apply', 'merge', 'reset'.... need to be taken into consideration as well.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/diff-options.txt | 8
diff.c | 4
t/t2203-add-intent.sh |
t top-dir, or in a linked worktree. And
"rm -r" is very dangerous to do in .git, a mistake in there could
destroy object database or other important data.
Provide "git rebase --forget" for this exact use case.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-rebase.txt
t top-dir, or in a linked worktree. And
"rm -r" is very dangerous to do in .git, a mistake in there could
destroy object database or other important data.
Provide "git rebase --forget" for this exact use case.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
v2 changes just th
t top-dir, or in a linked worktree. And
"rm -r" is very dangerous to do in .git, a mistake in there could
destroy object database or other important data.
Provide "git rebase --forget" for this exact use case.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
v3 rewrote the desscription
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
uys").
[1] https://public-inbox.org/git/20160625075433.4608-1-pclo...@gmail.com/
Nguyễn Thái Ngọc Duy (11):
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
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 f7869f8..7e15ec7 100644
--- a/worktree.c
+++ b/
-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
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
de is in
place, this validate_no_submodules() could be removed.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 307019c..11be345 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 21 +
worktree.h | 6 ++
2 files changed, 27 insertions(+)
diff --git a/worktree.c b/worktree.c
index 7e15ec7..db63758 100644
--- a/worktree.c
+++ b/worktree.c
@@ -354,6 +354,27 @@ int validate_worktree(const struct
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
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ễ
move the repository with the main worktree. The tricky part is make
sure all file descriptors to the repository are closed, or it may
fail on Windows.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 7 +++-
builtin/worktree.c
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
ine here.
Another option is just use a symbol, like '-' or '*' to mark
case-insensitivity. But that does not look very descriptive. I don't
see any symbol suggesting this case stuff.
What do you think?
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Docume
; stuff
in HEAD, from resolve_refs_unsafe(). Now may be the time since
refs refactoring is mostly done.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 8 +---
worktree.c | 6 ++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/builtin/wo
This keeps things a bit simpler when we add more fields, knowing that
default values are always zero.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/worktree.c b/worktree.c
index f7869f8..f7c1b5e 100644
This fixes two things:
- make sure the first item is always the main worktree even if we
fail to retrieve some info
- keep 'worktree list' order stable (which in turn fixes the random
failure on my 'worktree-move' series
Nguyễn Thái Ngọc Duy (3):
worktree.c: zero
It makes it easier to write tests for. But it should also be good for
the user since locating a worktree by eye would be easier once they
notice this.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git
This is the follow up of rs/qsort series, merged in b8688ad (Merge
branch 'rs/qsort' - 2016-10-10), where coccinelle was used to do
automatic transformation.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
coccinelle missed this place, understandably, because it can't know
that
u sort one
variable but you use the number of items and item size from an unrelated
variable (from a first glance)
Signed-off-by: Nguyễn Thái Ngọc Duy
---
merge-recursive.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
ind
This version
* changes get_worktrees() to take a flag, and adds one flag for
sorting.
* adds tests for both the 'main worktree always present' and the
sorting problems.
* reworks 3/5 a bit, keep changes closer, easier to see the cause and
consequence.
Nguyễn Thái N
This keeps things a bit simpler when we add more fields, knowing that
default values are always zero.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
worktree.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/worktree.c b/worktree.c
This is no-op. But it helps reduce diff noise in the next patch.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 5c4854d..8a654e4 100644
--- a/builtin/worktree.c
This is another no-op patch, in preparation for get_worktrees() to do
optional things, like sorting.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
branch.c | 2 +-
builtin/branch.c | 2 +-
builtin/worktree.c | 6 +++---
worktree.c | 4 ++--
worktree.h | 2 +-
5 files
quot; stuff in HEAD, from
resolve_refs_unsafe(). Now may be the time since refs refactoring is
mostly done.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 6 --
t/t2027-worktree-list.sh | 21 +
worktree.c | 10 +++---
3 files cha
It makes it easier to write tests for. But it should also be good for
the user since locating a worktree by eye would be easier once they
notice this.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 2 +-
t/t2027-worktree-list.sh | 19 +++
worktree.c
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 eb61212..929072a 100644
--- a/worktree.c
+++ b/
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 074b609..60c7d8a 100644
--- a/copy.c
+++ b/copy.c
@@ -111,8 +111,10 @@ int FAST_FUNC copy_file(const char
v2 contains some style fix and adapts to the new get_worktrees() api
from nd/worktree-list-fixup (which means it can't be built without
that series).
Nguyễn Thái Ngọc Duy (11):
copy.c: import copy_file() from busybox
copy.c: delete unused code in copy_file()
copy.c: convert bb_(p)erro
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 21 +
worktree.h | 6 ++
2 files changed, 27 insertions(+)
diff --git a/worktree.c b/worktree.c
index 929072a..7684951 100644
--- a/worktree.c
+++ b/worktree.c
@@ -354,6 +354,27 @@ int validate_worktree(const struct
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
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,
move the repository with the main worktree. The tricky part is make
sure all file descriptors to the repository are closed, or it may
fail on Windows.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 7 +++-
builtin/worktree.c
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 21 +
builtin/worktree.c | 79 ++
contrib/completion/git-completion.bash | 5 ++-
t/t2028-worktree-move.sh | 26 +++
4 files changed
-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
de is in
place, this validate_no_submodules() could be removed.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index f732a74..e36e4dc 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree
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
---
v2 has a different approach, and I think it's a better one even with
that unanswered question above.
Documentation/git-branch.txt | 4
Documentation/git-for-each-ref.txt | 3 +++
Documentation/git-tag.txt | 4 ++
at should
be no problem. for-each-ref, as a plumbing, might want finer control.
But we can always add --{filter,sort}-ignore-case when there is a need
for it.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Changes are in tests only:
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
n a memory chunk larger than pool size.
Check this case and abort.
Noticed-by: Rasmus Villemoes
[1] Details are in commit message of 58babff (shallow.c: the 8 steps to
select new commits for .git/shallow - 2013-12-05), step 6.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
shallow.c | 3 +++
1 file
ast a theoretical chance that the LHS could wrap
around 0, giving a false negative.
This might as well be written using pointer subtraction avoiding these
issues.
Signed-off-by: Rasmus Villemoes
Signed-off-by: Nguyễn Thái Ngọc Duy
---
shallow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
s non-negative. But let's just help less smart
compilers generate good code anyway.
Signed-off-by: Rasmus Villemoes
Signed-off-by: Nguyễn Thái Ngọc Duy
---
shallow.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/shallow.c b/shallow.c
index 719f699..beb967e 1006
G. We care about the
marking on _shallow commits_ that are not reachable from our current
history (and having UNINTERESTING on it means it's reachable). So it's
ok for an UNINTERESTING not to be ref-marked.
Reported-by: Rasmus Villemoes
Signed-off-by: Nguyễn Thái Ngọc Duy
---
shallow.c |
slab" is
a poor choice of name, at least poorer than "pool".
Signed-off-by: Nguyễn Thái Ngọc Duy
---
shallow.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/shallow.c b/shallow.c
index 4d0b005..8100dfd 100644
--- a/shallow.c
++
We need to allocate a "big" block of memory in paint_alloc(). The exact
size does not really matter. But the pool size has no relation with
commit-slab. Stop using that macro here.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
shallow.c | 6 --
1 file changed, 4 insertions(+), 2
wonder I
don't remember much about it :-D
Nguyễn Thái Ngọc Duy (4):
shallow.c: rename fields in paint_info to better express their purposes
shallow.c: stop abusing COMMIT_SLAB_SIZE for paint_info's memory pools
shallow.c: make paint_alloc slightly more robust
shallow.c: remove useless
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-rebase.txt | 4 ++--
contrib/completion/git-completion.bash | 4 ++--
git-rebase.sh | 6 +++---
t/t3407-rebase-abort.sh| 8
4 files changed, 11 insertions(+), 11 deletions
The old --quit remains supported, just hidden away.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-cherry-pick.txt | 2 +-
Documentation/git-revert.txt | 2 +-
Documentation/sequencer.txt| 2 +-
builtin/revert.c | 7
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
Changes are in
[01/41] usage.c: move format processing out of die_errno()
[02/41] usage.c: add warning_errno() and error_errno()
[12/41] builtin/update-index.c: prefer "err" to "errno" in process_lstat_error
[17/41] compat/win32/syslog.c: use warning_errno()
[27/41] grep.c: use error_err
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
301 - 400 of 5892 matches
Mail list logo