This documents the ref update status of fetch. The structure of this
output is defined in [1]. The ouput content is refined a bit in [2]
[3] [4].
This patch is a copy from git-push.txt, modified a bit because the
flag '-' means different things in push (delete) and fetch (tag
update).
PS. For
We do align "remote -> local" output by allocating 10 columns to
"remote". That produces aligned output only for short refs. An extra
pass is performed to find the longest remote ref name (that does not
produce a line longer than terminal width) to produce better aligned
output.
Signed-off-by:
This makes it easier to change the formatting later. And it makes sure
translators cannot mess up format specifiers and break Git.
There are a couple call sites where the length of the second column is
TRANSPORT_SUMMARY_WIDTH instead of calculated by TRANSPORT_SUMMARY(),
which is enforced now.
This makes the fetch flag code consistent with push, where '-' means
deleted ref.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-fetch.txt | 4 ++--
builtin/fetch.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
In the "remote -> local" line, if either ref is a substring of the
other, the common part in the other string is replaced with "$". For
example
abc-> origin/abc
refs/pull/123/head -> pull/123
become
abc -> origin/$
refs/$/head -> pull/123
Activated with
v4 is a cleaned up version of v3. Tests are added. Typos in
git-fetch.txt are corrected. The "{ -> origin/}master" format is
dropped.
Nguyễn Thái Ngọc Duy (5):
git-fetch.txt: document fetch output
fetch: refactor ref update status formatting code
fetch: change flag code for displaying tag
On Sat, Jun 25, 2016 at 9:21 PM, David Turner wrote:
> On 06/25/2016 10:33 AM, Duy Nguyen wrote:
>>>
>>> + /*
>>> +* Our connection to the client is blocking since a
>>> client
>>> +* can always be killed by SIGINT or similar.
>>>
From: Nguyễn Thái Ngọc Duy
The extension contains a bitmap, one bit for each entry in the
index. If the n-th bit is zero, the n-th entry is considered
unchanged, we can ce_mark_uptodate() it without refreshing. If the bit
is non-zero and we found out the corresponding file is
From: Nguyễn Thái Ngọc Duy
The previous patch has the logic to clear bits in 'WAMA' bitmap. This
patch has logic to set bits as told by watchman. The missing bit,
_using_ these bits, are not here yet.
A lot of this code is written by David Turner originally, mostly from
[1].
From: Nguyễn Thái Ngọc Duy
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
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
From: Nguyễn Thái Ngọc Duy
Watchman is hidden behind index-helper. Before git tries to read the
index from shm, it notifies index-helper through the socket and waits
for index-helper to prepare a file for sharing memory (with
MAP_SHARED). index-helper then contacts watchman,
From: Nguyễn Thái Ngọc Duy
All the known heavy code blocks are measured (except object database
access). This should help identify if an optimization is effective or
not. An unoptimized git-status would give something like below (92% of
time is accounted). To sum up the effort
From: David Turner
Instead of writing warnings to stderr, write them to a log. Later, we'll
probably be daemonized, so writing to stderr will be pointless.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
---
From: Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
---
Documentation/git-index-helper.txt | 3 +++
Documentation/git-update-index.txt | 6
From: David Turner
Make git checkout (and other unpack_tree operations) preserve the
untracked cache and watchman status. This is valuable for two reasons:
1. Often, an unpack_tree operation will not touch large parts of the
working tree, and thus most of the untracked
From: David Turner
Soon, we'll want to automatically start index-helper, so we need
a mode that silently exits if it can't start up (either because
it's not in a git dir, or because another one is already running).
Signed-off-by: David Turner
From: David Turner
Add a new command (and command-line arg) to allow index-helpers to
exit cleanly.
This is mainly useful for tests.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
---
From: David Turner
Introduce a new config option, indexhelper.autorun, to automatically
run git index-helper before starting up a builtin git command. This
enables users to keep index-helper running without manual
intervention.
Signed-off-by: David Turner
From: David Turner
For installations that have centrally-managed configuration, it's
easier to set a config once than to run update-index on every
repository.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
---
From: David Turner
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
---
index-helper.c | 7 +++
t/t7900-index-helper.sh | 9 +
2 files changed, 16 insertions(+)
diff --git a/index-helper.c
From: Nguyễn Thái Ngọc Duy
There are "holes" in the index-helper approach because the shared
memory is not verified again by git. If $USER is compromised, shared
memory could be modified. But anyone who could do this could already
modify $GIT_DIR/index. A more realistic risk
From: Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
---
read-cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Nguyễn Thái Ngọc Duy
Later, we will introduce git index-helper to share this memory with
other git processes.
We only unmap it when we discard the index (although the kernel may of
course choose to page it out).
Signed-off-by: Nguyễn Thái Ngọc Duy
From: Nguyễn Thái Ngọc Duy
Instead of reading the index from disk and worrying about disk
corruption, the index is cached in memory (memory bit-flips happen
too, but hopefully less often). The result is faster read. Read time
is reduced by 70%.
The biggest gain is not having
From: David Turner
packet_write calls write_or_die, which dies with a sigpipe even if
calling code has explicitly blocked that signal.
Add packet_write_gently and packet_flush_gently, which don't. Soon,
we will use this for communication with git index-helper, which,
From: Nguyễn Thái Ngọc Duy
We detach after creating and opening the socket, because otherwise
we might return control to the shell before index-helper is ready to
accept commands. This might lead to flaky tests.
Signed-off-by: Nguyễn Thái Ngọc Duy
On 06/25/2016 09:28 AM, Duy Nguyen wrote:
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
Of course, as soon as I pinged on the previous version, I noticed an issue.
...
A bit off-topic, but you may want to cut a release for libwatchman
(even 0.1.0 would do)
> On Jun 25, 2016, at 1:45 PM, Junio C Hamano wrote:
>
> Barret Rennie writes:
>
>>> What is "the name for the worktree"? Is it the directory where it lives in?
>>> Is it how it is listed with 'git worktree list'?
>>
>> The name of the worktree is the
"Philip Oakley" writes:
>> Yup, I think "range" is the commonly used word in discussions here.
>> When inventing A...B as a new thing in addition to A..B, we called
>> the former "symmetric difference", and what is implied by that is
>> the latter is "asymmetric
Barret Rennie writes:
>> What is "the name for the worktree"? Is it the directory where it lives in?
>>Is it how it is listed with 'git worktree list'?
>
> The name of the worktree is the name of the created directory in
> `.git/worktrees`.
>
>> How is --name different from
On 06/25/2016 10:33 AM, Duy Nguyen wrote:
+ /*
+* Our connection to the client is blocking since a client
+* can always be killed by SIGINT or similar.
+*/
+ set_socket_blocking_flag(client_fd, 0);
Out of curiosity, do
Signed-off-by: Philip Oakley
---
This is a quick follow on to the 'symmetric difference' documentation patches
http://thread.gmane.org/gmane.comp.version-control.git/297908/focus=298223
where I checked all the uses of 'left' to see if other terms had been used.
I noticed
While there, also break out the other shorthand notations and
add a title for the revision range summary (which also appears
in git-rev-parse).
Signed-off-by: Philip Oakley
---
Documentation/revisions.txt | 17 +
1 file changed, 13 insertions(+), 4
Signed-off-by: Philip Oakley
---
Documentation/gitk.txt | 2 +-
Documentation/rev-list-options.txt | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/gitk.txt b/Documentation/gitk.txt
index 6ade002..6c3eb15 100644
---
>> On Wed, Jun 22, 2016 at 08:25:59AM +0100, Philip Oakley wrote:
>>
>>> Is there a common name for the A..B range format (two dots) that would
>>> complement the A...B (three dots) symmetric range format's name?
$gmane/297908
Here is a short two patch series to hopefully enhance the
revisions
On Sat, Jun 25, 2016 at 3:28 PM, Duy Nguyen wrote:
> On Thu, May 19, 2016 at 11:45 PM, David Turner
> wrote:
>> Of course, as soon as I pinged on the previous version, I noticed an issue.
>> ...
>
> A bit off-topic, but you may want to cut a release
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> +static void autorun_index_helper(void)
> +{
> + const char *argv[] = {"git-index-helper", "--detach", "--autorun",
> NULL};
> + if (want_auto_index_helper() <= 0)
> + return;
> +
> +
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> @@ -417,6 +418,7 @@ int main(int argc, char **argv)
> "verify shared memory after creating"),
> OPT_BOOL(0, "detach", , "detach the process"),
> OPT_BOOL(0,
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> @@ -1149,6 +1152,19 @@ int cmd_update_index(int argc, const char **argv,
> const char *prefix)
> die("Bug: bad untracked_cache value: %d", untracked_cache);
> }
>
> + if (use_watchman
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> From: Nguyễn Thái Ngọc Duy +"poke ":
The new format is "poke ".
> + Like "poke", but replies with "OK". If the index has the
> + watchman extension, index-helper queries watchman, then
>
> SZEDER Gábor hat am 10. Juni 2016 um 15:10 geschrieben:
>
> Hallo Thomas,
>
> I saw v5 hit my mailbox while writing this. I glanced it over and it
> seems my comments here apply to that version as well.
Hi Gábor,
thanks for your comments.
I plan to send a reroll in the
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> @@ -1222,8 +1225,13 @@ int refresh_index(struct index_state *istate, unsigned
> int flags,
> continue;
>
> new = refresh_cache_ent(istate, ce, options, _errno,
> );
> -
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> From: Nguyễn Thái Ngọc Duy
>
> We detach after creating and opening the socket, because otherwise
> we might return control to the shell before index-helper is ready to
> accept commands. This
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> +--strict::
> +--no-strict::
> + Strict mode makes index-helper verify the shared memory after
> + it's created. If the result does not match what's read from
> + $GIT_DIR/index, the shared memory
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> .gitignore | 1 +
> Documentation/git-index-helper.txt | 50 ++
> Makefile | 5 +
> cache.h| 11 ++
>
On Fri, Jun 17, 2016 at 6:43 PM, Christian Couder
wrote:
> On Thu, May 19, 2016 at 11:45 PM, David Turner
> wrote:
>> From: Nguyễn Thái Ngọc Duy
>>
>> +static void loop(int fd, int idle_in_seconds)
>> +{
>> +
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> +int packet_flush_gently(int fd)
> +{
> + packet_trace("", 4, 1);
> + return write_in_full(fd, "", 4) != 4;
> +}
The return value convention here is a bit weird, isn't it? Usually we
have "zero
It has always been command-list.txt even at the time this
new-command.txt document is added.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/howto/new-command.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/howto/new-command.txt
From: "Junio C Hamano"
Jeff King writes:
On Wed, Jun 22, 2016 at 08:25:59AM +0100, Philip Oakley wrote:
Is there a common name for the A..B range format (two dots) that would
complement the A...B (three dots) symmetric range format's name?
I was looking
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote:
> Of course, as soon as I pinged on the previous version, I noticed an issue.
> ...
A bit off-topic, but you may want to cut a release for libwatchman
(even 0.1.0 would do) so it can be properly packaged.
--
Duy
--
On Fri, Jun 24, 2016 at 10:06 PM, Eric Wong wrote:
> Please don't drop Cc:, re-adding git@vger and Christian
>
> Jacob Godserv wrote:
>> > Christian (Cc-ed) also noticed the problem a few weeks ago
>> > and took a more drastic approach by having git-svn
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 @@
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 25 +
worktree.h | 6 ++
2 files changed, 31 insertions(+)
diff --git a/worktree.c b/worktree.c
index d5149d8..9b227a4 100644
--- a/worktree.c
+++ b/worktree.c
@@ -354,6 +354,31 @@ int
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 7 +++-
builtin/worktree.c | 61 ++
contrib/completion/git-completion.bash | 2 +-
t/t2028-worktree-move.sh | 30
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. For example, if a worktree is moved manually, the
worktree location recorded in $GIT_DIR/worktrees/.../gitdir is
incorrect and we should not move
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). This is a no-op commit. More changes are needed before
this new code can compile.
This will
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
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ễn Thái Ngọc Duy
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,
- selinux preservation code
- make-link code
- delete link dereference code
- non-recursive copy code
- stat no preservation code
- verbose printing code
Some of these are "cp" features that we don't need (for "git worktree
move"). Some do not make sense in source-control context (SELinux).
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
Now that nd/worktree-lock seems to be on its way to 'next', let's
continue to review this one. The first 5 patches bring busybox's copy
functionality to git. The last 5 add support functions and the two new
commands.
This series needs both nd/worktree-lock (for find_worktree) and
'master' (for
Sorry for replying to that message twice. I hit a bug in Apple Mail.
--Barret
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
> What is "the name for the worktree"? Is it the directory where it lives in?
>Is it how it is listed with 'git worktree list'?
The name of the worktree is the name of the created directory in
`.git/worktrees`.
> How is --name different from the argument?
Currently, if you run:
> What is "the name for the worktree"? Is it the directory where it lives in?
>Is it how it is listed with 'git worktree list'?
The name of the worktree is the name of the created directory in
`.git/worktrees`.
> How is --name different from the argument?
Currently, if you run:
Am 25.06.2016 um 07:15 schrieb Barret Rennie:
+--name::
+ Set the name for the worktree. If there is already a worktree with this
What is "the name for the worktree"? Is it the directory where it lives
in? Is it how it is listed with 'git worktree list'?
How is --name different from
Acked-by: Matthias Rüster
Am 24.06.2016 um 20:07 schrieb Ralf Thielow:
> Signed-off-by: Ralf Thielow
> ---
> po/de.po | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/po/de.po b/po/de.po
> index
This matches the documentation and allows gc.autoPackLimit=1
to maintain a single pack without attempting a repack on every
"git gc --auto" invocation.
Signed-off-by: Eric Wong
---
builtin/gc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/gc.c
Signed-off-by: Alex Henrie
---
t/t1011-read-tree-sparse-checkout.sh | 2 +-
t/t7607-merge-overwrite.sh | 2 +-
t/t7609-merge-co-error-msgs.sh | 10 +-
unpack-trees.c | 18 +-
4 files changed, 16
This is really to scratch an itch I have when I break my worktrees and can’t
figure out which worktree dir is the one I’ve broken. For example, I organize
my code as follows:
projects/reviewboard/branches//src/
django/
djblets/
reviewboard/
for each release branch I
Barret Rennie writes:
> Add the --name parameter to git worktree add that allows the user to set
> the name of the created worktree directory. A worktree must not already
> exist with the current name or creation will fail.
Hmph. This strongly smells like "because we can add
Eric Wong writes:
>> That's neither here nor there for the off-by-one in gc or its
>> documentation, of course, but just FYI.
>
> I'm now inclined to fix the problem in gc and leave the
> documentation as-is (unless it cause other problems...)
I think that is the best in the
72 matches
Mail list logo