Re: [git-users] More on that "merge branch checkout" problem -- cannot abort/go back?

2017-01-31 Thread Michael
he diff. To clarify #2: The three versions in the conflict file were "nothing" (the old develop that had none of these changes), "what was checked in" (the feature branch), and "everything"; what I wanted was "everything - what was checked in" (whi

RE: [PATCH v5 6/6] RFC blame: use a fingerprint heuristic to match ignored lines

2019-04-07 Thread michael
From: Michael Platings Hi Barret, This is the updated fuzzy matching algorithm, sorry for the delay. It does highlight a bug in the calculation for the number of lines ("int nr_parent_lines = e->num_lines - delta;") - if you apply the patch, build it, then try to ./git blame

RE: [PATCH v6 0/6] blame: add the ability to ignore commits

2019-04-22 Thread michael
From: Michael Platings Hi Barret, This patch is on top of your patch v6 4/6. Previously I pointed out that my code couldn't handle this case correctly: Before: commit-a 11) Position MyClass::location(Offset O) { commit-b 12)return P + O; commit-c 13) }

[PATCH] blame - fix some issues identified by coverage report.

2019-06-01 Thread michael
From: Michael Platings Thanks to Derrick Stolee for highlighting missing coverage. In the case of "certainties[i] = CERTAINTY_NOT_CALCULATED" this was defeating an optimization that preserved results of calculations between line-matching passes. This had caused other code to never b

[PATCH] Use an intermediate file between between git blame and sed to avoid git blame's exit code being hidden.

2019-06-15 Thread michael
From: Michael Platings --- t/t8014-blame-ignore-fuzzy.sh | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/t/t8014-blame-ignore-fuzzy.sh b/t/t8014-blame-ignore-fuzzy.sh index 1ff59624e9..13f3313710 100755 --- a/t/t8014-blame-ignore-fuzzy.sh +++ b/t/t8014-blame

[PATCH] t8014: avoid git command in upstream pipe

2019-06-16 Thread michael
From: Michael Platings Use an intermediate file between between git blame and sed to avoid git blame's exit code being hidden. Signed-off-by: Michael Platings --- t/t8014-blame-ignore-fuzzy.sh | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/t/t8014-

[PATCH] t8014: remove unnecessary braces

2019-06-30 Thread michael
From: Michael Platings Signed-off-by: Michael Platings --- t/t8014-blame-ignore-fuzzy.sh | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t8014-blame-ignore-fuzzy.sh b/t/t8014-blame-ignore-fuzzy.sh index 6f1a94caef..6e61882b6f 100755 --- a/t/t8014-blame-ignore

[RFC PATCH 0/1] Fuzzy blame

2019-03-24 Thread michael
From: Michael Platings Hi Git devs, Some of you may be familiar with the git-hyper-blame tool [1]. It's "useful if you have a commit that makes sweeping changes that are unlikely to be what you are looking for in a blame, such as mass reformatting or renaming." git-hyper-blame i

[RFC PATCH 1/1] Fuzzy blame

2019-03-24 Thread michael
From: Michael Platings --- blame.c| 352 +++-- blame.h| 1 + builtin/blame.c| 3 + t/t8020-blame-fuzzy.sh | 264 + 4 files changed, 609 insertions(+), 11 deletions

git broken for AIX somewhere between 2.13.2 and 2.13.3

2018-07-29 Thread Michael
ack failed p.s. - what surprises me re: git-2.13.2 - no messages about 'Cloning into ...', which version 2.13.1 did give. I guess a bisect is the next step - between version 2.13.2 and 2.13.3. Other suggestions welcome! Michael

Re: git broken for AIX somewhere between 2.13.2 and 2.13.3

2018-07-29 Thread Michael
On 29/07/2018 20:10, brian m. carlson wrote: On Sun, Jul 29, 2018 at 06:44:26PM +0200, Michael wrote: root@x066:[/tmp/xxx]git --version git version 2.13.3 root@x066:[/tmp/xxx]git clone g...@github.com:aixtools/hello-world.git Cloning into 'hello-world'... remote: Counting object

Re: git broken for AIX somewhere between 2.13.2 and 2.13.3

2018-07-29 Thread Michael
On 29/07/2018 21:27, brian m. carlson wrote: On Sun, Jul 29, 2018 at 08:59:39PM +0200, Michael wrote: On 29/07/2018 20:10, brian m. carlson wrote: Are you using SHA1DC on that system, and does compiling with another SHA-1 implementation help? There was a change to the SHA1DC code big endian

Re: git broken for AIX somewhere between 2.13.2 and 2.13.3

2018-07-29 Thread Michael
On 29/07/2018 22:06, brian m. carlson wrote: On Sun, Jul 29, 2018 at 09:48:43PM +0200, Michael wrote: On 29/07/2018 21:27, brian m. carlson wrote: Well, that explains it. I would recommend submitting a patch to https://github.com/cr-marcstevens/sha1collisiondetection, and the we can pull in

Re: git broken for AIX somewhere between 2.13.2 and 2.13.3

2018-07-29 Thread Michael
On 29/07/2018 23:40, Andreas Schwab wrote: On Jul 29 2018, Ævar Arnfjörð Bjarmason wrote: Also, to you and anyone else with access to AIX: I'd be happy to figure these issues out pro-actively if you give me a login to an AIX machine. I promise not to do anything except compile/debug/test git o

Re: Is detecting endianness at compile-time unworkable?

2018-07-31 Thread Michael
On 31/07/2018 16:25, Ævar Arnfjörð Bjarmason wrote: ...the real trick is using these macros outside of GCC / glibc and on older GCC versions. See the github link above, you basically end up with a whitelist of how it looks on different systems / compilers. Sometimes both are defined, sometimes on

[PATCH 1/4] get_remote_group(): handle remotes with single-character names

2015-07-28 Thread Michael Haggerty
The code for splitting a whitespace-separated list of values in "remotes." had an off-by-one error that caused it to skip over remotes whose names consist of a single character. Also remove unnecessary braces. Signed-off-by: Michael Haggerty --- builtin/fetch.c | 3 +-- 1 file

[PATCH 2/4] get_remote_group(): rename local variable "space" to "wordlen"

2015-07-28 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- builtin/fetch.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index 98f9048..d0d267b 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -978,13 +978,13 @@ static int get_remote_group(const

[PATCH 3/4] get_remote_group(): eliminate superfluous call to strcspn()

2015-07-28 Thread Michael Haggerty
There is no need to call it if value is the empty string. This also eliminates code duplication. Signed-off-by: Michael Haggerty --- builtin/fetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index d0d267b..bd945d0 100644 --- a

[PATCH 0/4] Fix handling of remotes with single-character names

2015-07-28 Thread Michael Haggerty
, but it also rebases cleanly to master. It might make sense to apply only the first patch to maint and the others only to master. These patches are also available from my GitHub repository [1] as branch "single-character-remotes". Michael [1] https://github.com/mhagger/git Michael H

[PATCH 4/4] get_remote_group(): use skip_prefix()

2015-07-28 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- builtin/fetch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index bd945d0..76ca100 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -975,8 +975,7 @@ static int get_remote_group(const char *key

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-28 Thread Michael Haggerty
e same time. It's just a thought; I have no idea whether it is practical... Michael -- Michael Haggerty mhag...@alum.mit.edu -- 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

Re: [PATCH 0/4] Fix handling of remotes with single-character names

2015-07-31 Thread Michael Haggerty
On 07/31/2015 12:12 AM, Junio C Hamano wrote: > Thanks, queued. > > By the way, do you plan to revisit two rather large-ish stalled > topics of yours queued on 'pu' any time soon? I hope to revive the "tempfile" and "numparse" topics earlyish in this

Re: [PATCH/RFC 0/2] bisect per-worktree

2015-07-31 Thread Michael Haggerty
want to be worktree-specific (for example, that in a linked worktree, "refs/bisect/*" should be silently redirected to "refs/worktree//bisect/*")? It's all a bit frightening, frankly. Michael -- Michael Haggerty mhag...@alum.mit.edu -- To unsubscribe from this

Re: [PATCH/RFC 0/2] bisect per-worktree

2015-07-31 Thread Michael Haggerty
On 08/01/2015 07:12 AM, Junio C Hamano wrote: > On Fri, Jul 31, 2015 at 8:59 PM, Michael Haggerty > wrote: >> >> It seems to me that adding a new top-level "worktree-refs" directory is >> pretty traumatic. Lots of people and tools will have made the assumpti

Re: [PATCH/RFC 0/9] Pseudorefs

2015-08-02 Thread Michael Haggerty
uite possible that other importers are using this name. I expect that such importers would slightly prefer that this reference be worktree-specific, but I doubt that anybody really cares that much. It seems unlikely that people will run `git fast-import` in multiple worktrees simultaneously. Michael

Re: [PATCH v2 00/10] object_id part 2

2015-08-02 Thread Michael Haggerty
ght help reviewers decide how much diligence is needed when reviewing these patches and what kind of changes to inspect extra carefully. Because doing a thorough review of all of the patches would be quite a bit of work. Michael -- Michael Haggerty mhag...@alum.mit.edu -- To unsubscribe from t

[PATCH] worktree: list operation

2015-08-08 Thread Michael Rappazzo
I am attempting to add the 'git worktree list' command. I don't have a lot of c experience, so please double check that I am not missing something important. Michael Rappazzo (1): worktree: list operation Documentation/git-worktree.txt | 9 - builtin/worktree.c

[PATCH] worktree: list operation

2015-08-08 Thread Michael Rappazzo
'git worktree list' will list the main worktree followed by any linked worktrees which were created using 'git worktree add'. The option '--main-only' will restrict the list to only the main worktree. --- Documentation/git-worktree.txt | 9 - builtin/worktree.c | 80 +

[PATCH v2] worktree: list operation

2015-08-08 Thread Michael Rappazzo
I am attempting to add the 'git worktree list' command. I don't have a lot of c experience, so please double check that I am not missing something important. Sorry about publishing the first version too soon. Michael Rappazzo (1): worktree: list operation Documentation/g

[PATCH v2] worktree: list operation

2015-08-08 Thread Michael Rappazzo
'git worktree list' will list the main worktree followed by any linked worktrees which were created using 'git worktree add'. The option '--main-only' will restrict the list to only the main worktree. --- Documentation/git-worktree.txt | 9 - builtin/worktree.c | 84 +

Re: [PATCH 06/14] tempfile: add several functions for creating temporary files

2015-08-09 Thread Michael Haggerty
On 06/10/2015 07:48 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Add several functions for creating temporary files with >> automatically-generated names, analogous to mkstemps(), but also >> arranging for the files to be deleted on program exit. >&

Re: [PATCH 07/14] register_tempfile(): new function to handle an existing temporary file

2015-08-09 Thread Michael Haggerty
On 06/10/2015 07:55 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Allow an existing file to be registered with the tempfile-handling >> infrastructure; in particular, arrange for it to be deleted on program >> exit. >> >> Signed-off-by: Michael Hag

[PATCH v2 00/16] Introduce a tempfile module

2015-08-10 Thread Michael Haggerty
/gmane.comp.version-control.git/270998 [2] https://github.com/mhagger/git Michael Haggerty (16): Move lockfile documentation to lockfile.h and lockfile.c create_bundle(): duplicate file descriptor to avoid closing it twice lockfile: add accessors get_lock_file_fd() and get_lock_file_

[PATCH v2 02/16] create_bundle(): duplicate file descriptor to avoid closing it twice

2015-08-10 Thread Michael Haggerty
_data(). Then that function can close its copy without closing the copy held in the lock_file object. Signed-off-by: Michael Haggerty --- This is new since v1. I like that it is better decoupled than the old code, but let me know if you think otherwise. Actually, it seems to me that start_comman

[PATCH v2 15/16] credential-cache--daemon: delete socket from main()

2015-08-10 Thread Michael Haggerty
main() is responsible for cleaning up the socket in the case of errors, so it is reasonable to also make it responsible for cleaning it up when there are no errors. This change also makes the next step easier. Signed-off-by: Michael Haggerty --- credential-cache--daemon.c | 3 ++- 1 file

[PATCH v2 06/16] tempfile: a new module for handling temporary files

2015-08-10 Thread Michael Haggerty
mplement lockfile on top of tempfile. Subsequent commits will add more users of the new module. Signed-off-by: Michael Haggerty --- Makefile | 1 + lockfile.c | 261 - lockfile.h | 73 +++

[PATCH v2 12/16] diff: use tempfile module

2015-08-10 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- diff.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/diff.c b/diff.c index 7500c55..dc95247 100644 --- a/diff.c +++ b/diff.c @@ -2,6 +2,7 @@ * Copyright (C) 2005 Junio C Hamano */ #include "ca

[PATCH v2 16/16] credential-cache--daemon: use tempfile module

2015-08-10 Thread Michael Haggerty
Use the tempfile module to ensure that the socket file gets deleted on program exit. Signed-off-by: Michael Haggerty --- credential-cache--daemon.c | 26 ++ 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/credential-cache--daemon.c b/credential-cache

[PATCH v2 10/16] write_shared_index(): use tempfile module

2015-08-10 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- read-cache.c | 38 ++ 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/read-cache.c b/read-cache.c index 96cb9a3..89be226 100644 --- a/read-cache.c +++ b/read-cache.c @@ -5,6 +5,7 @@ */ #define

[PATCH v2 09/16] register_tempfile(): new function to handle an existing temporary file

2015-08-10 Thread Michael Haggerty
created via the lockfile API * If it is not a regular file (e.g., a socket) Signed-off-by: Michael Haggerty --- tempfile.c | 8 tempfile.h | 8 2 files changed, 16 insertions(+) diff --git a/tempfile.c b/tempfile.c index 0b5d8ce..0af7ebf 100644 --- a/tempfile.c +++ b/tempfile.c

[PATCH v2 07/16] prepare_tempfile_object(): new function, extracted from create_tempfile()

2015-08-10 Thread Michael Haggerty
This makes the next step easier. The old code used to use "path" to set the initial length of tempfile->filename. This was not helpful because path was usually relative whereas the value stored to filename will be absolute. So just initialize the length to 0. Signed-off-by: Mic

[PATCH v2 03/16] lockfile: add accessors get_lock_file_fd() and get_lock_file_fp()

2015-08-10 Thread Michael Haggerty
We are about to move those members, so change client code to read them through accessor functions. Signed-off-by: Michael Haggerty --- credential-store.c | 2 +- lockfile.c | 14 ++ lockfile.h | 3 +++ read-cache.c | 2 +- refs.c | 12

[PATCH v2 13/16] lock_repo_for_gc(): compute the path to "gc.pid" only once

2015-08-10 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- builtin/gc.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/builtin/gc.c b/builtin/gc.c index 36fe333..c41354b 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -199,6 +199,7 @@ static const char *lock_repo_for_gc(int force, pid_t

[PATCH v2 04/16] lockfile: add accessor get_lock_file_path()

2015-08-10 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- builtin/commit.c | 15 --- config.c | 14 +++--- lockfile.c | 7 +++ lockfile.h | 6 ++ refs.c | 6 +++--- shallow.c| 6 +++--- 6 files changed, 34 insertions(+), 20 deletions(-) diff --git

[PATCH v2 11/16] setup_temporary_shallow(): use tempfile module

2015-08-10 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- shallow.c | 35 +++ 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/shallow.c b/shallow.c index 7973e74..2ba29a5 100644 --- a/shallow.c +++ b/shallow.c @@ -1,4 +1,5 @@ #include "cache.h" +#include &

[PATCH v2 14/16] gc: use tempfile module to handle gc.pid file

2015-08-10 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- builtin/gc.c | 25 + 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/builtin/gc.c b/builtin/gc.c index c41354b..bfe589f 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -11,6 +11,7 @@ */ #include "builtin.h"

[PATCH v2 05/16] commit_lock_file(): use get_locked_file_path()

2015-08-10 Thread Michael Haggerty
First beef up the sanity checking in get_locked_file_path() to match that in commit_lock_file(). Then rewrite commit_lock_file() to use get_locked_file_path() for its pathname computation. Signed-off-by: Michael Haggerty --- lockfile.c | 28 1 file changed, 12

[PATCH v2 08/16] tempfile: add several functions for creating temporary files

2015-08-10 Thread Michael Haggerty
the code where temporary files are created and cleaned up ad-hoc. Signed-off-by: Michael Haggerty --- tempfile.c | 53 ++ tempfile.h | 96 ++ 2 files changed, 149 insertions(+) diff --git a/tempfile.c b

[PATCH v2 01/16] Move lockfile documentation to lockfile.h and lockfile.c

2015-08-10 Thread Michael Haggerty
Rearrange/rewrite it somewhat to fit its new environment. Signed-off-by: Michael Haggerty --- Documentation/technical/api-lockfile.txt | 220 --- lockfile.c | 53 ++ lockfile.h | 290

Re: [PATCH 11/17] refs.c: simplify strbufs in reflog setup and writing

2015-08-10 Thread Michael Haggerty
const unsigned char *new_sha1, const char *msg, > -struct strbuf *sb_log_file, int flags, > +struct strbuf *log_file, int flags, > struct strbuf *err) > { > [...] Nice change. How about taking this o

Re: [PATCH 17/17] memoize common git-path "constant" files

2015-08-10 Thread Michael Haggerty
memoized functions were called before git_common_dir is initialized, then the pre-git_common_dir value would continue to be used even if git_common_dir is changed afterwards. But I believe it is taboo to call git_path() before setup_git_env(), so I think this is not a problem. Michael -- Michael

Re: [PATCH 0/17] removing questionable uses of git_path

2015-08-10 Thread Michael Haggerty
: memoize common git-path "constant" files I read through all of the patches (except for 03) and didn't see any problems. Thanks, Peff, for defusing some grenades :-) Michael -- Michael Haggerty mhag...@alum.mit.edu -- To unsubscribe from this list: send the line "unsubscr

[PATCH v3] worktree: add 'list' command

2015-08-10 Thread Michael Rappazzo
'git worktree list' will list the main worktree followed by any linked worktrees which were created using 'git worktree add'. Signed-off-by: Michael Rappazzo --- Documentation/git-worktree.txt | 6 +++- builtin/worktree.c | 67 +++

[PATCH v3] worktree: add 'list' command

2015-08-10 Thread Michael Rappazzo
Differences from [v2](http://www.mail-archive.com/git@vger.kernel.org/msg75467.html) - removed unintended whitespace changes - cleanup based on comments from v2 Michael Rappazzo (1): worktree: add 'list' command Documentation/git-worktree.txt | 6 +++- builtin/

Re: [PATCH 04/17] add_to_alternates_file: don't add duplicate entries

2015-08-10 Thread Michael Haggerty
ut if I'm wrong, it might be friendly to de-dup the existing lines while copying them. Michael -- Michael Haggerty mhag...@alum.mit.edu -- 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

Re: [PATCH v2 12/16] diff: use tempfile module

2015-08-12 Thread Michael Haggerty
On 08/11/2015 10:03 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Signed-off-by: Michael Haggerty >> --- >> diff.c | 29 +++-- >> 1 file changed, 7 insertions(+), 22 deletions(-) > > Nice code reduction. > >>

Re: [PATCH v2 00/16] Introduce a tempfile module

2015-08-12 Thread Michael Haggerty
On 08/11/2015 10:21 PM, Junio C Hamano wrote: > Thanks for a pleasant read. All looked reasonable. Thanks for your review! Michael -- Michael Haggerty mhag...@alum.mit.edu -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vg

[PATCH v2' 12/16] diff: use tempfile module

2015-08-12 Thread Michael Haggerty
Also add some code comments explaining how the fields in "struct diff_tempfile" are used. Signed-off-by: Michael Haggerty --- This is a replacement for tempfile patch v2 12/16 that includes some extra code comments. It is also available from my GitHub repo [1] on branch "tempfi

Re: [PATCH v3 2/4] path: optimize common dir checking

2015-08-13 Thread Michael Haggerty
3rd-party applications that think they are clever enough to grub around in `$GIT_DIR` at the filesystem level. But that should be highly discouraged, and we should make it our mission to provide commands that make it unnecessary. Michael -- Michael Haggerty mhag...@alum.mit.edu -- To unsubscribe f

[PATCH 0/2 v4] worktree: for_each_worktree and list

2015-08-13 Thread Michael Rappazzo
NOT included in the iterated worktrees Michael Rappazzo (2): worktree: add 'for_each_worktree' function worktree: add 'list' command Documentation/git-worktree.txt | 11 +++- builtin/worktree.c | 139 + t/t2

[PATCH 2/2 v4] worktree: add 'list' command

2015-08-13 Thread Michael Rappazzo
'git worktree list' uses the for_each_worktree function to iterate, and outputs in the format: ' ()' Signed-off-by: Michael Rappazzo --- Documentation/git-worktree.txt | 11 - builtin/worktree.c | 55 ++ t/t2

[PATCH 1/2 v4] worktree: add 'for_each_worktree' function

2015-08-13 Thread Michael Rappazzo
value is returned from the for_each_worktree function. Signed-off-by: Michael Rappazzo --- builtin/worktree.c | 84 ++ 1 file changed, 84 insertions(+) diff --git a/builtin/worktree.c b/builtin/worktree.c index 430b51e..a43e360 100644 --- a/bu

Re: [PATCH v3 3/4] refs: make refs/worktree/* per-worktree

2015-08-13 Thread Michael Haggerty
ks. > > When I make that change, my test fails with: > > FATAL: Unexpected exit with code 2 > > Apparently, you can't use ! in pipelines like that. So that's why I > used test_must_fail. You would have to negate the whole pipeline, like ! git for-each-r

Re: [PATCH v3 3/4] refs: make refs/worktree/* per-worktree

2015-08-14 Thread Michael Haggerty
On 08/13/2015 10:32 PM, David Turner wrote: > On Thu, 2015-08-13 at 22:16 +0200, Michael Haggerty wrote: >> On 08/13/2015 07:41 PM, David Turner wrote: >>> On Thu, 2015-08-13 at 13:15 -0400, Eric Sunshine wrote: >>>> On Wed, Aug 12, 2015 at 5:57 PM, David Turner &g

Re: [PATCH v3 2/4] path: optimize common dir checking

2015-08-15 Thread Michael Haggerty
On 08/14/2015 07:04 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Let's take a step back. >> >> We have always had a ton of code that uses `git_path()` and friends to >> convert abstract things into filesystem paths. Let's take the

Re: [PATCH v3 2/4] path: optimize common dir checking

2015-08-15 Thread Michael Haggerty
(That is, the other way was a giant hassle). OK, so the functions can be empty for the lmdb backend, too :-) > [...] > For this patch series, I don't think we need to change anything [...] > Implementing > Junio's proposal would not affect this series; it would jus

[PATCH v5 0/2] Worktree: for-each function and list command

2015-08-22 Thread Michael Rappazzo
27; is true when the primary repo is bare, however `is_bare_repository()` returns false. The worktree_path also needs to the "/.git" removed from it. Therefore, I opted to keep the code like this. Michael Rappazzo (2): worktree: add 'for_each_worktree' function worktree: add 'li

[PATCH v5 2/2] worktree: add 'list' command

2015-08-22 Thread Michael Rappazzo
'git worktree list' uses the for_each_worktree function to iterate, and outputs in the format: ' ()' Signed-off-by: Michael Rappazzo --- Documentation/git-worktree.txt | 11 +- builtin/worktree.c | 55 t/t2027-worktre

[PATCH v5 1/2] worktree: add 'for_each_worktree' function

2015-08-22 Thread Michael Rappazzo
value is returned from the for_each_worktree function. Signed-off-by: Michael Rappazzo --- builtin/worktree.c | 83 ++ 1 file changed, 83 insertions(+) diff --git a/builtin/worktree.c b/builtin/worktree.c index 430b51e..7b3cb96 100644 --- a/bu

Re: [PATCH v13 05/12] ref-filter: add option to filter out tags, branches and remotes

2015-08-26 Thread Michael Haggerty
rbuf buf = STRBUF_INIT; > diff --git a/refs.h b/refs.h > index e9a5f32..6e913ee 100644 > --- a/refs.h > +++ b/refs.h > @@ -179,6 +179,7 @@ extern int for_each_remote_ref(each_ref_fn fn, void > *cb_data); > extern int for_each_replace_ref(each_ref_fn fn, void *cb_data); > ext

Re: [PATCH v13 05/12] ref-filter: add option to filter out tags, branches and remotes

2015-08-27 Thread Michael Haggerty
On 08/27/2015 02:42 PM, Karthik Nayak wrote: > On Wed, Aug 26, 2015 at 9:40 PM, Michael Haggerty > wrote: >> On 08/22/2015 05:39 AM, Karthik Nayak wrote: >>> [...] >>> + if (type == FILTER_REFS_BRANCHES) >>> + ret = for_each_reftype_fullpa

[PATCH v6 1/2] worktree: add 'for_each_worktree' function

2015-08-30 Thread Michael Rappazzo
value is returned from the for_each_worktree function. Signed-off-by: Michael Rappazzo --- builtin/worktree.c | 83 ++ 1 file changed, 83 insertions(+) diff --git a/builtin/worktree.c b/builtin/worktree.c index 430b51e..7b3cb96 100644 --- a/bu

[PATCH v6 2/2] worktree: add 'list' command

2015-08-30 Thread Michael Rappazzo
'git worktree list' uses the for_each_worktree function to iterate, and outputs the worktree dir. With the verbose option set, it also shows the branch or revision currently checked out in that worktree. Signed-off-by: Michael Rappazzo --- Documentation/git-worktree.txt | 10

[PATCH v6 0/2] worktree: for-each function and list command

2015-08-30 Thread Michael Rappazzo
Changes since v5: - used already existing functions instead of reimplementing: - resolve_ref_unsafe - find_unique_abbrev - shorten_unambiguous_ref - added more tests for 'worktree list' Michael Rappazzo (2): worktree: add 'for_each_worktree' function

[PATCH v7 1/3] worktree: add top-level worktree.c

2015-09-04 Thread Michael Rappazzo
Including functions to get the list of all worktrees, and to get a specific worktree (primary or linked). Signed-off-by: Michael Rappazzo --- Makefile | 1 + worktree.c | 157 + worktree.h | 48 +++ 3 files changed

[PATCH v7 0/3] worktree: worktree.c functions and list builtin command

2015-09-04 Thread Michael Rappazzo
This series represents a major rewrite of the previous series. It introduces a top-level worktree.c which includes `get_worktree_list` and `get_worktree` functions, and it also moves the `find_shared_symref` from branch.c to worktree.c Michael Rappazzo (3): worktree: add top-level worktree.c

[PATCH v7 3/3] worktree: add 'list' command

2015-09-04 Thread Michael Rappazzo
ble), also decorate bare worktrees Signed-off-by: Michael Rappazzo --- Documentation/git-worktree.txt | 10 +++- builtin/worktree.c | 63 + t/t2027-worktree-list.sh | 122 + 3 files changed, 194 insertions(+),

[PATCH v7 2/3] worktree: move/refactor find_shared_symref from branch.c

2015-09-04 Thread Michael Rappazzo
The code formerly in branch.c was largely the basis of the get_worktree_list implementation is now moved to worktree.c, and the find_shared_symref implementation has been refactored to use get_worktree_list Signed-off-by: Michael Rappazzo --- branch.c| 79

Bloom filters for have/want negotiation

2015-09-11 Thread Michael Haggerty
has promise. (I have no plans to pursue it.) Michael [1] http://git-merge.com/videos/scaling-git-at-twitter-wilhelm-bierbaum.html -- Michael Haggerty mhag...@alum.mit.edu -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.ker

Re: Bloom filters for have/want negotiation

2015-09-13 Thread Michael Haggerty
On 09/12/2015 07:16 AM, Shawn Pearce wrote: > On Fri, Sep 11, 2015 at 2:13 PM, Michael Haggerty > wrote: >> I have been thinking about Wilhelm Bierbaum's talk at the last GitMerge >> conference [1] in which he describes a scheme for using Bloom filters to >&g

Re: [PATCH v4] gc: save log from daemonized gc --auto and print it next time

2015-09-16 Thread Michael Haggerty
is log file in a function > whose name is remove_pidfile() ;-) > > Adding a new function to tempfile API that puts the file to a final > place if it is non-empty and otherwise remove it, and using that to > create this "gc.log" file, would be the cleanest from the point of &g

Re: [PATCH v4] gc: save log from daemonized gc --auto and print it next time

2015-09-17 Thread Michael Haggerty
ecution. ^^^ This was the point that was confusing me. If this is not one of the roles of the log file, then things are easier. If you decide to go the route of tempfile/lockfile modifications, feel free to CC me for feedback. Michael -- Michael Haggerty mhag...@alum.mit.edu -- To unsubscri

[PATCH v8 2/4] worktree: refactor find_linked_symref function

2015-09-18 Thread Michael Rappazzo
Refactoring will help transition this code to provide additional useful worktree functions. Signed-off-by: Michael Rappazzo --- worktree.c | 86 ++ 1 file changed, 64 insertions(+), 22 deletions(-) diff --git a/worktree.c b/worktree.c

[PATCH v8 3/4] worktree: add functions to get worktree details

2015-09-18 Thread Michael Rappazzo
The worktree structure provided for an individual worktree includes the absolute path, the location of the git dir, the head ref (if not detached), the head revision sha1, whether or not head is detached, and whether or not the worktree is a bare repo. Signed-off-by: Michael Rappazzo

[PATCH v8 4/4] worktree: add 'list' command

2015-09-18 Thread Michael Rappazzo
'git worktree list' iterates through the worktree list, and outputs details of the worktree including the path to the worktree, the currently checked out revision and branch, and if the work tree is bare. There is also porcelain format option available. Signed-off-by: Michae

[PATCH v8 0/4] worktree: list functions and command

2015-09-18 Thread Michael Rappazzo
/git/git/compare/master...rappazzo:worktree-list/v8/next-entry-in-worktree Michael Rappazzo (4): worktree: add top-level worktree.c worktree: refactor find_linked_symref function worktree: add functions to get worktree details worktree: add 'list' command Documentation/git-wo

[PATCH v8 1/4] worktree: add top-level worktree.c

2015-09-18 Thread Michael Rappazzo
worktree.c contains functions to work with and get information from worktrees. This introduction moves functions related to worktrees from branch.c into worktree.c Signed-off-by: Michael Rappazzo --- Makefile| 1 + branch.c| 79

Re: [PATCH v4 1/2] git-p4: add test case for "Translation of file content failed" error

2015-09-22 Thread Michael Blume
I'm seeing test failures non-executable tests: t9825-git-p4-handle-utf16-without-bom.sh ls -l shows that all the other tests are executable but t9825 isn't. On Tue, Sep 22, 2015 at 9:02 AM, Junio C Hamano wrote: > Lars Schneider writes: > >> This works. > > OK, and thanks; as I don't do perfor

Re: [PATCH 41/68] init: use strbufs to store paths

2015-09-29 Thread Michael Blume
On Thu, Sep 24, 2015 at 2:07 PM, Jeff King wrote: > The init code predates strbufs, and uses PATH_MAX-sized > buffers along with many manual checks on intermediate sizes > (some of which make magic assumptions, such as that init > will not create a path inside .git longer than 50 > characters). >

[PATCH v9 3/5] worktree: add a function to get worktree details

2015-10-02 Thread Michael Rappazzo
The worktree structure provided for an individual worktree includes the absolute path of the worktree. The fuction to get the worktree details is a refactor of the find main/linked symref functions. Signed-off-by: Michael Rappazzo --- worktree.c | 161

[PATCH v9 2/5] worktree: refactor find_linked_symref function

2015-10-02 Thread Michael Rappazzo
Refactoring will help transition this code to provide additional useful worktree functions. Signed-off-by: Michael Rappazzo --- worktree.c | 94 -- 1 file changed, 67 insertions(+), 27 deletions(-) diff --git a/worktree.c b/worktree.c

[PATCH v9 5/5] worktree: add 'list' command

2015-10-02 Thread Michael Rappazzo
'git worktree list' iterates through the worktree list, and outputs details of the worktree including the path to the worktree, the currently checked out revision and branch, and if the work tree is bare. There is also porcelain format option available. Signed-off-by: Michae

[PATCH v9 4/5] worktree: add details to the worktree struct

2015-10-02 Thread Michael Rappazzo
In addition to the absolute path in the worktree struct, add the location of the git dir, the head ref (if not detached), the head revision sha1, whether or not head is detached, and whether or not the worktree is a bare repo. Signed-off-by: Michael Rappazzo --- worktree.c | 55

[PATCH v9 1/5] worktree: add top-level worktree.c

2015-10-02 Thread Michael Rappazzo
worktree.c contains functions to work with and get information from worktrees. This introduction moves functions related to worktrees from branch.c into worktree.c Signed-off-by: Michael Rappazzo --- Makefile| 1 + branch.c| 79

[PATCH v9 0/5] worktree: list functions and command

2015-10-02 Thread Michael Rappazzo
[1]: http://thread.gmane.org/gmane.comp.version-control.git/278190 Michael Rappazzo (5): worktree: add top-level worktree.c worktree: refactor find_linked_symref function worktree: add a function to get worktree details worktree: add details to the worktree struct worktree: add '

Re: [PATCH v5 2/3] path: optimize common dir checking

2015-10-04 Thread Michael Haggerty
suggest a raft of other improvements. Ask me if you are interested. Michael -- Michael Haggerty mhag...@alum.mit.edu -- 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

Re: [PATCH v2 01/43] refs.c: create a public version of verify_refname_available

2015-10-04 Thread Michael Haggerty
e, struct string_list *extra, > + struct string_list *skip, struct strbuf *err); > + > +/* > * Flags controlling ref_transaction_update(), ref_transaction_create(), etc. > * REF_NODEREF: act on the ref directly, instead of dereferencing > * symbolic references. > Michael -- Michael Haggerty mhag...@alum.mit.edu -- 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

Re: [PATCH v2 02/43] refs: make repack_without_refs and is_branch public

2015-10-04 Thread Michael Haggerty
ithout_refs(struct string_list *refnames, struct strbuf *err) I looked for the corresponding change to remove `static` from is_branch(). Apparently that function already had external linkage, even though it was not listed in the header file. As a convenience to readers you might note that peculiari

Re: [PATCH v2 18/43] refs-be-files.c: add a backend method structure with transaction functions

2015-10-05 Thread Michael Haggerty
gt; + ref_transaction_create_fn transaction_create; > + ref_transaction_delete_fn transaction_delete; > + ref_transaction_verify_fn transaction_verify; > + ref_transaction_commit_fn transaction_commit; > + ref_transaction_free_fn transaction_free; > +}; > + > + > +extern struct ref_

Re: [PATCH v2 22/43] refs-be-files.c: add do_for_each_per_worktree_ref

2015-10-05 Thread Michael Haggerty
include per-worktree refs in a do_for_each_ref*() iteration */ > +#define DO_FOR_EACH_PER_WORKTREE_ONLY 0x02 And why do you define this one here instead of in refs-be-files.c? > [...] Michael -- Michael Haggerty mhag...@alum.mit.edu -- To unsubscribe from this list: send the li

  1   2   3   4   5   6   7   8   9   10   >