The 'commit --dry-run' and 'commit' return values differed if a
conflicted merge had been resolved and the commit would be the same as
the parent.
Update show_merge_in_progress to set the commitable bit if conflicts
have been resolved and a merge is in progress.
Signed-off-by: Stephen P. Smith
On Tuesday, February 16, 2016 07:33:54 PM Junio C Hamano wrote:
> "Stephen P. Smith" writes:
>
> > The 'commit --dry-run' and commit return values differed if a
> > conflicted merge had been resolved and the commit would be the same as
> > the parent.
> >
> > Update
On 16 February 2016 at 23:37, Eric Sunshine wrote:
> On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis
> wrote:
>> No more renames option. rename-threshold enables renames.
>
> Can you add some tests? Off the top of my head, I'd expect to
"Stephen P. Smith" writes:
> The 'commit --dry-run' and commit return values differed if a
> conflicted merge had been resolved and the commit would be the same as
> the parent.
>
> Update show_merge_in_progress to set the commitable bit if conflicts
> have been resolved and a
Incorporate documentation input from Eric Sunshine. Fix missing signoff.
The first part is unchanged.
No tests are included for now. This work is being done in parallel and should
be properly included in future proposals.
Felipe Gonçalves Assis (2):
merge-recursive: option to disable renames
The recursive strategy turns on rename detection by default. Add a
strategy option to disable rename detection even for exact renames.
Signed-off-by: Felipe Gonçalves Assis
---
Documentation/merge-strategies.txt | 6 ++
merge-recursive.c | 7 +++
Add strategy option find-renames, following git-diff interface. This
makes the option rename-threshold redundant.
Signed-off-by: Felipe Gonçalves Assis
---
Documentation/merge-strategies.txt | 10 ++
merge-recursive.c | 5 -
2 files changed,
On 16 February 2016 at 23:41, Eric Sunshine wrote:
> On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis
> wrote:
>> The recursive strategy turns on rename detection by default. Add a
>> strategy option to disable rename detection even for
Signed-off-by: GyuYong Jung
---
git-cvsserver.perl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 95e69b1..02c0445 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2664,7 +2664,7 @@ sub
On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis
wrote:
> Add strategy option find-renames, following git-diff interface. This
> makes the option rename-threshold redundant.
Missing sign-off.
> ---
> diff --git a/Documentation/merge-strategies.txt
>
On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis
wrote:
> The recursive strategy turns on rename detection by default. Add a
> strategy option to disable rename detection even for exact renames.
>
> Signed-off-by: Felipe Gonçalves Assis
>
On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis
wrote:
> No more renames option. rename-threshold enables renames.
Can you add some tests? Off the top of my head, I'd expect to see at
least three new tests:
1. --no-renames works as expected
2. last wins in
The recursive strategy turns on rename detection by default. Add a
strategy option to disable rename detection even for exact renames.
Signed-off-by: Felipe Gonçalves Assis
---
Documentation/merge-strategies.txt | 6 ++
merge-recursive.c | 7 +++
No more renames option. rename-threshold enables renames.
detect_rename is now a simple boolean. Its value is no longer linked to
DIFF_ANYTHING symbol.
A second optional patch is included, teaching merge-recursive to take
"find-renames[=]" as well, for consistency.
Felipe Gonçalves Assis (2):
Add strategy option find-renames, following git-diff interface. This
makes the option rename-threshold redundant.
---
A minor note
git diff --check complains about an indent with spaces here, but I think I did
the right thing: indented with tabs and aligned with spaces. If desired, I can
align
On Tue, Feb 16, 2016 at 04:28:10PM -0800, Junio C Hamano wrote:
> Jeff King writes:
>
> > On Tue, Feb 16, 2016 at 04:12:08PM -0800, Junio C Hamano wrote:
> >
> >> > To be honest, though, I am now on the fence, considering the possible
> >> > whitespace issue.
> >>
> >> Certainly
On Tue, Feb 16, 2016 at 03:49:55PM -0800, Junio C Hamano wrote:
> > And if you put the git_pager() call inside prepare_pager_args (which I
> > agree would be cleaner), we just have:
> >
> > void prepare_pager_args(struct child_process *pager_process);
> >
> > which is pretty self-explanatory
Jeff King writes:
> On Tue, Feb 16, 2016 at 04:12:08PM -0800, Junio C Hamano wrote:
>
>> > To be honest, though, I am now on the fence, considering the possible
>> > whitespace issue.
>>
>> Certainly not having to see s[0]->buf over and over is a huge win ;-).
>>
>> Is the
On Tue, Feb 16, 2016 at 04:12:08PM -0800, Junio C Hamano wrote:
> > To be honest, though, I am now on the fence, considering the possible
> > whitespace issue.
>
> Certainly not having to see s[0]->buf over and over is a huge win ;-).
>
> Is the "whitespace issue" a big deal? Does it involve
"Felipe Gonçalves Assis" writes:
> @@ -482,10 +482,13 @@ static struct string_list *get_renames(struct
> merge_options *o,
> struct diff_options opts;
>
> renames = xcalloc(1, sizeof(struct string_list));
> + if (!o->detect_rename)
> +
Jeff King writes:
>> > Should we? Or perhaps: might we? If the answer is yes, we are likely
>> > better off with strbuf_split, because then we are only a strbuf_trim()
>> > away from making that work.
>>
>> I also considered the issue of embedded whitespace very early on when
>>
Michael Haggerty writes:
> Previously, we were pretty sloppy about leaving empty directories
> behind (under both $GIT_DIR/refs and $GIT_DIR/logs) when deleting
> references. Such directories could accumulate essentially forever.
> It's true that `pack-refs` deletes
Jeff King writes:
> On Tue, Feb 16, 2016 at 03:06:56PM -0800, Junio C Hamano wrote:
>
>> diff --git a/pager.c b/pager.c
>> index 5dbcc5a..1406370 100644
>> --- a/pager.c
>> +++ b/pager.c
>> @@ -53,6 +53,23 @@ const char *git_pager(int stdout_is_tty)
>> return pager;
>> }
>>
On Tue, Feb 16, 2016 at 02:22:14PM +0100, Michael Haggerty wrote:
> Theoretically, free() is allowed to change errno. So preserve the errno
> from safe_create_leading_directories() across the call to free().
I wondered if this was actually a problem in practice. POSIX forbids
recreational
Felipe Gonçalves Assis writes:
> Just a note: In git-diff, there is no "--renames". Instead, renames
> are enabled by the "--find-renames[=]" option.
>
> 1. Do you think "rename-threshold=" should enable renames?
I do not think it matters in practice, but if you have
On Tuesday, February 16, 2016 04:26:38 PM Stephen & Linda Smith wrote:
> On Tuesday, February 16, 2016 01:54:48 PM Junio C Hamano wrote:
> > "Philip Oakley" writes:
> >
> > >>It appeared that the conditional for 'Reject an attempt to record a
> > >>non-merge empty
On Tuesday, February 16, 2016 08:20:43 AM Philip Oakley wrote:
> From: "Stephen P. Smith"
> > The 'commit --dry-run' and commit return values differed if a
>
> Should this have quotes around the second 'commit' as they both refer to the
> command, rather than the action?
OK
>
The recursive strategy turns on rename detection by default. Add a
strategy option to disable rename detection even for exact renames.
Signed-off-by: Felipe Gonçalves Assis
---
Following Hamano's review, this patch includes a strategy option "renames" and
simplifies the
On Tue, Feb 16, 2016 at 03:06:56PM -0800, Junio C Hamano wrote:
> diff --git a/pager.c b/pager.c
> index 5dbcc5a..1406370 100644
> --- a/pager.c
> +++ b/pager.c
> @@ -53,6 +53,23 @@ const char *git_pager(int stdout_is_tty)
> return pager;
> }
>
> +void prepare_pager_args(struct
On Tuesday, February 16, 2016 01:54:48 PM Junio C Hamano wrote:
> "Philip Oakley" writes:
>
> >>It appeared that the conditional for 'Reject an attempt to record a
> >>non-merge empty commit without * explicit --allow-empty.' could be
> >>simplified after adding
On Tue, Feb 16, 2016 at 05:49:19PM -0500, Eric Sunshine wrote:
> On Tue, Feb 16, 2016 at 5:34 PM, Jeff King wrote:
> > On Tue, Feb 16, 2016 at 04:09:53PM -0500, Eric Sunshine wrote:
> >> My initial reaction was negative due to the heavy review burden this
> >> series has demanded
Patrick Steinhardt writes:
> if (rebasing) {
> strbuf_reset();
> strbuf_addf(, "branch.%s.rebase", local);
> - git_config_set(key.buf, "true");
> + if (git_config_set(key.buf, "true") < 0)
> + goto out_err;
When running a pager, we need to run the program git_pager() gave
us, but we need to make sure we spawn it via the shell (i.e. it is
valid to say PAGER='less -S', for example) and give default values
to $LESS and $LV environment variables. Factor out these details
to a separate helper function.
These days, using the embedded args array in the child_process
structure is the norm. Follow that practice.
Signed-off-by: Junio C Hamano
---
pager.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/pager.c b/pager.c
index 070dc11..5dbcc5a 100644
---
The 'v'iew subcommand of the interactive mode of "git am -i" was
broken by the rewrite to C we did at around 2.6.0 timeframe at
7ff26832 (builtin-am: implement -i/--interactive, 2015-08-04); we
used to spawn the pager via the shell, accepting things like
PAGER='less -S'
in the
The 'v'iew subcommand of the interactive mode of "git am -i" was
broken by the rewrite to C we did at around 2.6.0 timeframe at
7ff26832 (builtin-am: implement -i/--interactive, 2015-08-04); we
used to spawn the pager via the shell, accepting things like
PAGER='less -S'
in the
On Tue, Feb 16, 2016 at 5:34 PM, Jeff King wrote:
> On Tue, Feb 16, 2016 at 04:09:53PM -0500, Eric Sunshine wrote:
>> My initial reaction was negative due to the heavy review burden this
>> series has demanded thus far, however, my mind was changing even as I
>> composed the above
On 16 February 2016 at 19:49, Junio C Hamano wrote:
> "Felipe Gonçalves Assis" writes:
>
>> +no-renames;;
>> + Turn off rename detection.
>> + See also linkgit:git-diff[1] `--no-renames`.
>
> Even though by default for merge-recursive the
On Tue, Feb 16, 2016 at 04:09:53PM -0500, Eric Sunshine wrote:
> My initial reaction was negative due to the heavy review burden this
> series has demanded thus far, however, my mind was changing even as I
> composed the above response. In retrospect, I think I'd be okay seeing
> a v6, for the
On Tue, Feb 16, 2016 at 01:24:29PM -0800, Brian Norris wrote:
> On Tue, Feb 16, 2016 at 03:45:57PM -0500, Jeff King wrote:
> > See the section on History Simplification in git-log. But basically,
> > when you specify a pathspec, git does not traverse side branches that
> > had no effect on the
On Tue, Feb 16, 2016 at 10:14:45PM +, Ramsay Jones wrote:
> > I think it's more than that one-liner. This patch shows "type:name"
> > verbatim from what is passed into do_config_from_file, as does the error
> > message. If they are going to have different output formats (e.g.,
> > "" versus
On 16/02/16 17:38, Jeff King wrote:
> On Tue, Feb 16, 2016 at 04:46:07PM +, Ramsay Jones wrote:
>
>>> OK, I am happy to add the extra code.
>>
>> Unless I've missed something (quite possible), this patch does not
>> need to change. (you have (both) convinced me that your current
>>
Junio C Hamano writes:
> "Felipe Gonçalves Assis" writes:
>
>> +no-renames;;
>> +Turn off rename detection.
>> +See also linkgit:git-diff[1] `--no-renames`.
>
> Even though by default for merge-recursive the rename detection is
> on, if we
On 15/02/16 17:42, Jeff King wrote:
> On Mon, Feb 15, 2016 at 11:17:45AM +0100, larsxschnei...@gmail.com wrote:
>
>> From: Lars Schneider
>>
>> Use the config type to print more detailed error messages that inform
>> the user about the origin of a config error (file,
On Mon, 2016-02-15 at 16:57 +0700, Duy Nguyen wrote:
> On Sun, Feb 14, 2016 at 7:04 PM, Duy Nguyen
> wrote:
> > On Sat, Feb 6, 2016 at 2:44 AM, David Turner <
> > dtur...@twopensource.com> wrote:
> > > +static char *get_refdb_path(const char *base)
> > > +{
> > > + static
"Philip Oakley" writes:
>>It appeared that the conditional for 'Reject an attempt to record a
>>non-merge empty commit without * explicit --allow-empty.' could be
>>simplified after adding this patch.
>>
>>This change can't be propagated to the conditional
"Felipe Gonçalves Assis" writes:
> +no-renames;;
> + Turn off rename detection.
> + See also linkgit:git-diff[1] `--no-renames`.
Even though by default for merge-recursive the rename detection is
on, if we are adding an option to control this aspect of the
Thomas Gummerer writes:
> Previous rounds are at $gmane/286214 and $gmane/286278. Thanks to
> Peff and Eric for the reviews on the previous round.
>
> This version changes two checks in [1/4], and uses test_config in the
> tests instead of calling git config directly.
Jeff King writes:
> Yeah, maybe. There were two reasons I avoided adding a test.
>
> One, I secretly hoped that by dragging my feet we could get consensus on
> just ripping out merge-tree entirely. ;)
>
> Two, I'm not sure what the test output _should_ be. I think this case is
>
On Tue, Feb 16, 2016 at 03:45:57PM -0500, Jeff King wrote:
> See the section on History Simplification in git-log. But basically,
> when you specify a pathspec, git does not traverse side branches that
> had no effect on the given pathspec.
Thanks for the pointer. Is this done primarily for
Jeff King writes:
> On Mon, Feb 15, 2016 at 07:19:07PM -0800, Junio C Hamano wrote:
>
>> I suspect that "#else" is too agressive to bail out or something
>> silly like that.
>>
>> Oh, I think I found it.
>>
>> @@ -216,6 +219,13 @@ static int http_options(const char *var, const
On Tue, Feb 16, 2016 at 3:49 PM, Jeff King wrote:
> On Tue, Feb 16, 2016 at 03:12:29PM -0500, Eric Sunshine wrote:
>> > Did you consider just using string_list_split for this? AFAICT, you
>> > don't care about the results being strbufs themselves, and it would do
>> > what you want
On Tue, Feb 16, 2016 at 03:12:29PM -0500, Eric Sunshine wrote:
> > Did you consider just using string_list_split for this? AFAICT, you
> > don't care about the results being strbufs themselves, and it would do
> > what you want without having to bother with patch 1. [...]
> >
> > Sorry to waltz
On Tue, Feb 16, 2016 at 12:24:42PM -0800, Brian Norris wrote:
> I'm not sure if this is a known behavior or a new bug report. I at least
> couldn't find anyone mentioning this exact problem.
>
> I'm using a git repository that has multiple "inital commits" (i.e., a
> few different directory
On Tue, Feb 16, 2016 at 01:14:09PM +0100, Stefan Frühwirth wrote:
> On 2016-02-16 at 06:50, Jeff King wrote:
> >Yeah, maybe. There were two reasons I avoided adding a test.
> >
> >One, I secretly hoped that by dragging my feet we could get consensus on
> >just ripping out merge-tree entirely. ;)
Hi,
I'm not sure if this is a known behavior or a new bug report. I at least
couldn't find anyone mentioning this exact problem.
I'm using a git repository that has multiple "inital commits" (i.e., a
few different directory trees were imported via svn-to-git as different
branches) whose
On Tue, Feb 16, 2016 at 2:22 PM, Jeff King wrote:
> On Wed, Feb 17, 2016 at 12:30:05AM +0530, Karthik Nayak wrote:
>> Use the newly introduced strbuf_split_str_omit_term() rather than
>> using strbuf_split_str() and manually removing the ',' terminator.
>>
>> Helped-by: Eric
On Tue, Feb 16, 2016 at 02:22:32PM -0500, Jeff King wrote:
> On Wed, Feb 17, 2016 at 12:30:05AM +0530, Karthik Nayak wrote:
>
> > Use the newly introduced strbuf_split_str_omit_term() rather than
> > using strbuf_split_str() and manually removing the ',' terminator.
> >
> > Helped-by: Eric
On Wed, Feb 17, 2016 at 12:30:05AM +0530, Karthik Nayak wrote:
> Use the newly introduced strbuf_split_str_omit_term() rather than
> using strbuf_split_str() and manually removing the ',' terminator.
>
> Helped-by: Eric Sunshine
> Signed-off-by: Karthik Nayak
Introduce contents_atom_parser() which will parse the '%(contents)'
atom and store information into the 'used_atom' structure based on the
modifiers used along with the atom. Also introduce body_atom_parser()
and subject_atom_parser() for parsing atoms '%(body)' and '%(subject)'
respectively.
Introduce objectname_atom_parser() which will parse the
'%(objectname)' atom and store information into the 'used_atom'
structure based on the modifiers used along with the atom.
Helped-by: Ramsay Jones
Helped-by: Eric Sunshine
Introduce remote_ref_atom_parser() which will parse the '%(upstream)'
and '%(push)' atoms and store information into the 'used_atom'
structure based on the modifiers used along with the corresponding
atom.
Helped-by: Ramsay Jones
Helped-by: Eric Sunshine
Use the newly introduced strbuf_split_str_omit_term() rather than
using strbuf_split_str() and manually removing the ',' terminator.
Helped-by: Eric Sunshine
Signed-off-by: Karthik Nayak
---
ref-filter.c | 9 +
1 file changed, 1
Parsing atoms is done in populate_value(), this is repetitive and
hence expensive. Introduce a parsing function which would let us parse
atoms beforehand and store the required details into the 'used_atom'
structure for further usage.
Helped-by: Eric Sunshine
Helped-by:
>From populate_value() extract parse_align_position() which given a
string would give us the alignment position. This is a preparatory
patch as to introduce prefixes for the %(align) atom and avoid
redundancy in the code.
Helped-by: Eric Sunshine
Signed-off-by: Karthik
Introduce align_atom_parser() which will parse an 'align' atom and
store the required alignment position and width in the 'used_atom'
structure for further usage in populate_value().
Since this patch removes the last usage of match_atom_name(), remove
the function from ref-filter.c.
Helped-by:
Introduce the 'used_atom' structure to replace the existing
implementation of 'used_atom' (which is a list of atoms). This helps
us parse atoms beforehand and store required details into the
'used_atom' for future usage.
Helped-by: Eric Sunshine
Signed-off-by: Karthik
Bump code to the top for usage in further patches.
Signed-off-by: Karthik Nayak
---
ref-filter.c | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 38f38d4..c3a8372 100644
---
Introduce optional prefixes "width=" and "position=" for the align atom
so that the atom can be used as "%(align:width=,position=)".
Add Documentation and tests for the same.
Helped-by: Eric Sunshine
Signed-off-by: Karthik Nayak
---
The current implementation of 'strbuf_split_buf()' includes the
terminator at the end of each strbuf post splitting. Add an option
wherein we can drop the terminator if desired. In this context
introduce a wrapper function 'strbuf_split_str_omit_term()' which
splits a given string into strbufs
Introduce color_atom_parser() which will parse a "color" atom and
store its color in the "used_atom" structure for further usage in
populate_value().
Helped-by: Ramsay Jones
Helped-by: Eric Sunshine
Signed-off-by: Karthik Nayak
This series cleans up populate_value() in ref-filter, by moving out
the parsing part of atoms to separate parsing functions. This ensures
that parsing is only done once and also improves the modularity of the
code.
v1: http://thread.gmane.org/gmane.comp.version-control.git/281180
v2:
On Sun, Feb 14, 2016 at 9:05 AM, Jeff King wrote:
>
> I'm also not happy about having an HTTP-only feature in the protocol. I
> liked Stefan's proposal for the "v2" protocol that would let the two
> sides exchange capabilities before the ref advertisement. Then the
> client, having
On Sat, Feb 13, 2016 at 3:21 AM, Matthieu Moy
wrote:
> Jeff King writes:
>
>> On Fri, Feb 12, 2016 at 08:10:34AM +0100, Matthieu Moy wrote:
>>
>>> So, that makes it 4 possible co-mentors, i.e. 2 potential slots. Not
>>> much, but it starts looking
On Tue, Feb 16, 2016 at 04:46:07PM +, Ramsay Jones wrote:
> > OK, I am happy to add the extra code.
>
> Unless I've missed something (quite possible), this patch does not
> need to change. (you have (both) convinced me that your current
> solution is the best).
>
> The only change that I
On Tue, Feb 16, 2016 at 7:56 AM, Patrick Steinhardt wrote:
> [...]
> Junio pointed out that it might not always be the most sensible
> thing to die when install_branch_config fails. After thinking
> about it I changed the behavior of the function to print an error
> and advise
On 16/02/16 09:51, Lars Schneider wrote:
>
> On 15 Feb 2016, at 23:39, Ramsay Jones wrote:
>
>>
>>
>> On 15/02/16 21:40, Jeff King wrote:
>>> On Mon, Feb 15, 2016 at 09:36:23PM +, Ramsay Jones wrote:
>>>
> +test_expect_success '--show-origin stdin' '
>
On 2016/02/16 15:33 +0900, Eric Wong wrote:
> Kazutoshi Satoda wrote:
>> Thank you for the tests. But, on my environment, both of them failed
>> unexpectedly. (Windows 7 SP1, x86_64 Cygwin, LANG=ja_JP.UTF-8)
...
>> > Untracked files:
>> > svnrepo/
>> >
On Tue, Feb 16, 2016 at 10:47:48AM +0100, Thomas Gummerer wrote:
> Previous rounds are at $gmane/286214 and $gmane/286278. Thanks to
> Peff and Eric for the reviews on the previous round.
This round looks good to me. Thanks for working on it!
Reviewed-by: Jeff King
-Peff
--
To
The exit path for SCLD_EXISTS wasn't setting errno, as expected by at
least one caller. Fix the problem and document that the function sets
errno correctly to help avoid similar regressions in the future.
While we're at it, document the difference between
safe_create_leading_directories() and
Instead of coding the retry loop inline, use raceproof_create_file() to
make lock acquisition safe against directory creation/deletion races.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 47 +++
1 file changed, 19
Change log_ref_setup() to use raceproof_create_file() to create the new
logfile. This makes it more robust against a race against another
process that might be trying to clean up empty directories while we are
trying to create a new logfile.
This also means that it will only call
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/worktree.c | 2 +-
worktree.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 68341e4..cfc848d 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
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 45ec47f..099d52e 100644
---
"refname" has already been checked by check_refname_format(), so it
cannot have consecutive slashes.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/refs/files-backend.c
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 97666cc..b261e11 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -332,7 +332,7 @@ static
Instead of writing the name of the reflog file into a strbuf that is
supplied by the caller but not needed there, write it into a local
temporary buffer and remove the strbuf parameter entirely.
And while we're adjusting the function signature, reorder the arguments
to move the input parameters
We can reconstruct git_dir from id quite easily. It's a bit hackier to
do the reverse.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 29 -
worktree.h | 7 ++-
2 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/worktree.c
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
Besides shortening the code, this saves an unnecessary call to
safe_create_leading_directories_const() in almost all cases.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 76 ++--
1 file changed, 32 insertions(+),
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 6 +++-
builtin/worktree.c | 60 ++
contrib/completion/git-completion.bash | 2 +-
t/t2028-worktree-move.sh | 29
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,
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 4c38414..b4e4b57 100644
--- a/worktree.c
+++ b/worktree.c
@@ -4,14 +4,22 @@
#include
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Documentation/git-worktree.txt | 22 +
builtin/worktree.c | 81 ++
contrib/completion/git-completion.bash | 5 ++-
t/t2028-worktree-move.sh | 26
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 28195b1..04aac73 100644
--- a/worktree.c
+++ b/worktree.c
@@ -282,6 +282,31 @@ int
Signed-off-by: Nguyễn Thái Ngọc Duy
---
worktree.c | 18 ++
worktree.h | 6 ++
2 files changed, 24 insertions(+)
diff --git a/worktree.c b/worktree.c
index 04aac73..facb907 100644
--- a/worktree.c
+++ b/worktree.c
@@ -219,6 +219,24 @@ int
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 e444ad1..e878f49 100644
--- a/worktree.c
+++ b/worktree.c
@@ -214,6 +214,11 @@ struct worktree
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 cfc848d..97666cc 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -263,7 +263,7 @@ static int
Instead of looking on the filesystem inside ".git/refs/remotes/origin",
use "git for-each-ref" to check for leftover references under the
remote's old name.
Signed-off-by: Michael Haggerty
---
t/t5505-remote.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
1 - 100 of 157 matches
Mail list logo