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
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
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) }
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
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
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-
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
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
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
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
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
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
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
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
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
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
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
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
,
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
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
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
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
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
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
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
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
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
'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 +
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
'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 +
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.
>&
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
/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_
_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
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
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 +++
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
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
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
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
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
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
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
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
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 &
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"
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
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
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
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
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
: 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
'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 +++
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/
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
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.
>
>>
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
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
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
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
'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
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
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
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
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
(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
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
'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
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
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
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
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
'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
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
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
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
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(+),
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
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
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
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
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
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
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
'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
/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
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
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
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).
>
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
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
'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
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
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
[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 '
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
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
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
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_
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 - 100 of 4199 matches
Mail list logo