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 | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/usage.c b/usage.c
index 82ff131..8675d72 100644
--- a/usage.c
+++ b
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 | 21 +
2 files changed, 23 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index 1f8b5f3
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/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/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/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/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
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
---
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
"errno" is already passed in as "err". Here we should use err instead of
errno. errno is probably a copy/paste mistake in e011054 (Teach
git-update-index about gitlinks - 2007-04-12)
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/update-index.c | 2 +-
1 file change
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
---
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
---
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..6c7c9b6 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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
grep.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grep.c b/grep.c
index 528b652..4f3779a 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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
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
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 | 21 +
2 files changed, 23 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 | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/usage.c b/usage.c
index 82ff131..8675d72 100644
--- a/usage.c
+++ b
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
Code changes compared to v2 is below (one incorrect conversion
reverted, two error message improvements). Other changes are text in
these commits, not shown as diff in this mail:
[06/41] builtin/fetch.c: use error_errno()
[08/41] builtin/mailsplit.c: use error_errno()
[09/41] builtin/merge-f
A couple of newlines are also removed, because both error() and
error_errno() automatically append a newline.
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
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
---
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
"errno" is already passed in as "err". Here we should use err instead of
errno. errno is probably a copy/paste mistake in e011054 (Teach
git-update-index about gitlinks - 2007-04-12)
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/update-index.c | 2 +-
1 file change
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
While at there, improve the message a bit (what operation failed?) and
mark it for translation since the format string is now a sentence.
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
There's one change, in split_mbox(), where an error() without strerror()
as argument is converted to error_errno(). This is correct because the
previous call is fopen (not shown in the context lines), which should
set errno if it returns NULL.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
bu
While at there, improve the error message to say _what_ failed to
remove.
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
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
All these error() calls do not print error message previously, but
because when they are called, errno should be set. Use error_errno()
instead to give more information.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/merge-file.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/pack-objects.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index a27de5b..1145747 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
---
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
---
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..6c7c9b6 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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
---
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
While at there, improve the error message a bit (what operation failed?)
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..ec6f7ff 100644
--- a/grep.c
+++ b/grep.c
@@ -1732,7 +1732,7 @@ static
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
---
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
---
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
---
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
---
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
---
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
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
---
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
strbuf is a bit overkill for this function. What we need is call
absolute_path() twice and make sure the second call does not destroy the
result of the first. One buffer allocation is enough.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 16 +++-
1 file changed, 7 insertions
This is probably not the best order. But it makes it no-brainer to know
where to insert new commands. At some point we might want to reorder at
least the synopsis part again, grouping commonly use subcommands together.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 10
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 b53f802..f9dac37 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -337,7 +337,7 @@ static int add(int ac
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 2 +-
worktree.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index bf80111..aaee0e2 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -95,7 +95,7
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 aaee0e2..b53f802 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -262,7 +262,7 @@ static int add_worktree(const
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 3402475..d3ac391 100644
--- a/contrib/completion/git
The use case is keep some worktree and discard the rest of the worktree
list.
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 f4a4f38..335c58f 100644
ff-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 335c58f..a6d1ad1 100644
--- a/worktree.c
+++ b/worktree.c
@@ -222,6 +222,22 @@ const char *get_worktree_git_dir(const struct worktre
This provides an API for checking if a worktree is locked. We need to
check this to avoid double locking a worktree, or try to unlock one when
it's not even locked.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 18 ++
worktree.h | 6 ++
2 files changed, 24 inser
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
---
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
Main worktree _is_ different. You can lock a linked worktree but not the
main one, for example. Provide an API for checking that.
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
strbuf is a bit overkill for this function. What we need is to call
absolute_path() twice and make sure the second call does not destroy the
result of the first. One buffer allocation is enough.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 16 +++-
1 file changed, 7
This is probably not the best order. But it makes it no-brainer to know
where to insert new commands. At some point we might want to reorder at
least the synopsis part again, grouping commonly use subcommands together.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 10
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 2 +-
worktree.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index bf80111..aaee0e2 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -95,7 +95,7
This adds bare-bone completion support for git-worktree. More advanced
completion (e.g. ref completion in git-worktree-add) can be added later.
--force completion in "worktree add" is left out because that option
should be handled with care.
Signed-off-by: Nguyễn Thái Ngọc Duy
--
@ extern struct worktree **get_worktrees(void);
*/
extern const char *get_worktree_git_dir(const struct worktree *wt);
-/*
- * Free up the memory for worktree
- */
-extern void clear_worktree(struct worktree *);
-
/*
* Free up the memory for worktree(s)
*/
-- 8< --
Nguyễn Thái Ngọc Du
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 aaee0e2..b53f802 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -262,7 +262,7 @@ static int add_worktree(const
This also makes slash conversion always happen on Windows (a side effect
of prefix_filename). Which is a good thing.
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
401 - 500 of 5892 matches
Mail list logo