On Fri, Mar 29, 2019 at 5:05 PM Thomas Gummerer wrote:
>
> On 03/29, Matheus Tavares Bernardino wrote:
> > On Thu, Mar 28, 2019 at 7:10 PM Thomas Gummerer
> > wrote:
> > > I notice that we are currently not using 'linkat()' anywhere else in
> > > our codebase. It looks like it has been introduc
Hi!
As you may have noticed, I sent you an email from your account.
This means that I have full access to your account: At the time of hacking your
account(git@vger.kernel.org) had this password: ani420
You can say: this is my, but old password!
Or: I can change my password at any time!
Of cour
On Fri, Mar 29, 2019 at 4:32 PM Thomas Gummerer wrote:
>
> On 03/29, Matheus Tavares Bernardino wrote:
> > On Thu, Mar 28, 2019 at 6:49 PM Thomas Gummerer
> > wrote:
> > > When sending someone elses patch in a slightly modified version, it
> > > may also be useful to add which parts you changed,
On Fri, Mar 29, 2019 at 4:35 PM Rohit Ashiwal
wrote:
>
> Hi Elijah
>
> On Sat, Mar 30, 2019 at 4:56 AM Elijah Newren wrote:
> >
> > Overall this looks pretty good to me, just one question...
> >
>
> :)
>
> > > 5. `[Bonus]` --signoff
> >
> > --signoff is new and surprises me. What's the plan
Signed-off-by: Elijah Newren
---
t/t6043-merge-rename-directories.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t6043-merge-rename-directories.sh
b/t/t6043-merge-rename-directories.sh
index 62c564707b..fe205be607 100755
--- a/t/t6043-merge-rename-directories.sh
+++
These structs are related and reference each other, so move them
together to make it easier for folks to determine what they hold and
what their purpose is.
Signed-off-by: Elijah Newren
---
merge-recursive.c | 78 +++
1 file changed, 39 insertions(+),
We previously tracked the branch associated with a rename in a separate
field in rename_conflict_info, but since it is directly associated with
the rename it makes more sense to move it into the rename struct.
Signed-off-by: Elijah Newren
---
merge-recursive.c | 113 +
struct diff_filespec defines mode to be an 'unsigned short'. Several
other places in the API which we'd like to interact with using a
diff_filespec used a plain unsigned (or unsigned int). This caused
problems when taking addresses, so switch to unsigned short.
Signed-off-by: Elijah Newren
---
Since we want to replace oid,mode pairs with a single diff_filespec,
we will soon want to be able to use the names 'o', 'a', and 'b' for
the three different file versions. Rename some local variables in
blob_unchanged() that would otherwise conflict.
Signed-off-by: Elijah Newren
---
merge-recur
Pass a merge_file_info struct to handle_content_merge() so that the
callers can access the oid and mode of the result afterward.
Signed-off-by: Elijah Newren
---
merge-recursive.c | 37 -
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/merge-re
When all of x/a, x/b, and x/c have moved to z/a, z/b, and z/c on one
branch, there is a question about whether x/d added on a different
branch should remain at x/d or appear at z/d when the two branches are
merged. There are different possible viewpoints here:
A) The file was placed at x/d; it'
We used a couple different names, but used 'ci' the most. Use the same
variable name throughout for a little extra consistency.
Signed-off-by: Elijah Newren
---
merge-recursive.c | 41 ++---
1 file changed, 18 insertions(+), 23 deletions(-)
diff --git a/merg
In the previous commit, we noted that several places throughout merge
recursive both had a reason to use 'o'; some for a merge_options struct,
and others for a diff_filespec struct. Some places had both, forcing
one of the two to be renamed, though the choice was inconsistent. Now
that the merge_
The name 'o' was used for the merge_options struct pointer taken by many
functions, but in a few places it was named 'opt'. Several functions
that didn't need merge_options instead used 'o' for a diff_filespec
argument or local. Some functions needed both an inconsistently either
renamed the merg
The ren1_other and ren2_other fields were synthesized from information
in ren1->src_entry and ren2->src_entry. Since we already have the
necessary information in ren1 and ren2, just use those.
Signed-off-by: Elijah Newren
---
merge-recursive.c | 71 ++
Instead of passing various bits and pieces of 'ci', just pass it
directly.
Signed-off-by: Elijah Newren
---
merge-recursive.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index f85c276f35..ada1c19ed2 1
There was a significant inconsistency in the various parts of the API
used in merge-recursive; many places used a pair of (oid, mode) to track
file version/contents, while other parts used a diff_filespec (which
have an oid and mode embedded in it). This inconsistency caused lots of
places to need
The rename_conflict_info struct used both a pair and a stage_data which
were taken from a rename struct. Just use the original rename struct.
This will also allow us to start making other simplifications to the
code.
Signed-off-by: Elijah Newren
---
merge-recursive.c | 120 +++--
I know this is kinda big, but it's mostly simple mechanical cleanups.
Stuff I'd like reviewers to focus on:
* Patch 15, particularly looking over the new testcases (13a-13d) in
t6043 and the documentation.
* Should I have switched 'unsigned short' to 'unsigned' instead of
vice-versa in
Directory rename detection previously silently applied. In order to
allow printing information about paths that changed or printing a
conflict notification (and only doing so near other potential conflict
messages associated with the paths), save this information inside the
rename struct for later
On Thu, 7 Mar 2019 at 09:00, Mike Hommey wrote:
> On Wed, Mar 06, 2019 at 03:14:11PM +0100, Johannes Schindelin wrote:
> >
> > just wanted to express my gratitude for your idea to introduce the `break`
> > command in `git rebase -i`'s todo list. I use it *all* the time now.
>
> +1. Before that, I
Hi Elijah
On Sat, Mar 30, 2019 at 4:56 AM Elijah Newren wrote:
>
> Overall this looks pretty good to me, just one question...
>
:)
> > 5. `[Bonus]` --signoff
>
> --signoff is new and surprises me. What's the plan with that one?
>
I was reading the documentation of git-rebase[1], where I f
Hi Rohit,
On Fri, Mar 29, 2019 at 3:33 PM Rohit Ashiwal
wrote:
>
> Hiya
>
> This is the v2 of the draft proposal[1]. I've added some details to the
> proposal,
> it talks more about what to implement instead of how. It is still incomplete.
>
> I'm currently adding more to the overview section, w
Am Mi., 6. März 2019 um 06:14 Uhr schrieb Johannes Schindelin
:
>
> Hi Stefan,
>
> just wanted to express my gratitude for your idea to introduce the `break`
> command in `git rebase -i`'s todo list. I use it *all* the time now.
You're welcome. As you know I am currently taking a break form #git,
Hiya
This is the v2 of the draft proposal[1]. I've added some details to the
proposal,
it talks more about what to implement instead of how. It is still incomplete.
I'm currently adding more to the overview section, where I'll document the work
done by Dscho and Alban. After that I'll find files
On Fri, Mar 29 2019, Jeff Hostetler via GitGitGadget wrote:
> From: Jeff Hostetler
>
> Teach Windows version of git to report peak memory usage
> during exit() processing.
>
> Signed-off-by: Jeff Hostetler
> ---
> common-main.c| 2 +-
> compat/win32/trace2_win32_p
ch :)
I wrote this on top to bikeshed this a bit further, wonder what you
think:
https://github.com/gitgitgadget/git/compare/pr-169/jeffhostetler/core-tr2-startup-and-sysenv-v2...avar:pr-169/jeffhostetler/core-tr2-startup-and-sysenv-v2
So e.g.:
Before: 20190329-220413-446441-c2f5b994-018702
After:
Duy -
Any updates on this feature request?
Joe
On Thu, Feb 21, 2019 at 7:06 AM Duy Nguyen wrote:
>
> On Thu, Feb 21, 2019 at 1:07 AM Joe Enzminger
> wrote:
> >
> > That is correct. What you suggest is actually what I tried (using
> > sha-1 syntax). For my purposes, excluding the tag's parent
Teach oid_object_info_extended() to support a new flag that inhibits
fetching of missing objects. This is equivalent to setting
fetch_is_missing to 0, calling oid_object_info_extended(), then setting
fetch_if_missing to whatever it was before. Update unpack-trees.c to use
this new flag instead of r
Thanks, everyone for the review.
Changes from v1:
- used test_when_finished (Szeder)
- used flag to inhibit fetching of missing objects (Dscho)
- moved the prefetch so that it also works if we request rename
detection, and included a test demonstrating that (not sure if that
was what Peff
When running a command like "git show" or "git diff" in a partial clone,
batch all missing blobs to be fetched as one request.
This is similar to c0c578b33c ("unpack-trees: batch fetching of missing
blobs", 2017-12-08), but for another command.
Signed-off-by: Jonathan Tan
---
diff.c
Hi!
As you may have noticed, I sent you an email from your account.
This means that I have full access to your account: At the time of hacking your
account(git@vger.kernel.org) had this password: dirgantara
You can say: this is my, but old password!
Or: I can change my password at any time!
Of
On 03/29, Ævar Arnfjörð Bjarmason wrote:
>
> On Thu, Mar 28 2019, Thomas Gummerer wrote:
> > I notice that we are currently not using 'linkat()' anywhere else in
> > our codebase. It looks like it has been introduced in POSIX.1-2008,
> > which sounds fairly recent by git's standards. So I wonder
On 03/29, Matheus Tavares Bernardino wrote:
> On Thu, Mar 28, 2019 at 7:10 PM Thomas Gummerer wrote:
> > I notice that we are currently not using 'linkat()' anywhere else in
> > our codebase. It looks like it has been introduced in POSIX.1-2008,
> > which sounds fairly recent by git's standards.
On Fri, Mar 29, 2019 at 01:35:19PM +0100, SZEDER Gábor wrote:
> The release of Asciidoctor v2.0.0 two days ago broke our documentation
Well, what happened "two days ago" when I sent v2 is now seven days
ago... Let's just say "recent" instead.
--- >8 ---
Subject: ci: stick with Asciidoctor v1
On Fri, Mar 29, 2019 at 07:31:58PM +, Thomas Gummerer wrote:
> > Also every test and job is
> > passing at travis-ci, except by the job named "Documentation"[1]. But,
> > it's weird since these patches don't even touch Documentation/... And
> > master
On 03/29, Matheus Tavares Bernardino wrote:
> On Thu, Mar 28, 2019 at 6:49 PM Thomas Gummerer wrote:
> > When sending someone elses patch in a slightly modified version, it
> > may also be useful to add which parts you changed, as it was done in
> > e8dfcace31 ("poll: use GetTickCount64() to avoid
On 03/29, Kapil Jain wrote:
> On Fri, Mar 29, 2019 at 3:00 AM Thomas Gummerer wrote:
> >
> >
> > I had previously mentioned that this project was attempted already in
> > my email at [*1*]. Did you take a look at the thread I linked to
> > there, and the regex used? I still feel like that previo
Hi Johannes,
On Fri, Mar 29, 2019 at 04:47:42PM +0100, Johannes Schindelin wrote:
> Hi Denton,
>
> On Thu, 28 Mar 2019, Denton Liu wrote:
>
> > A common scenario is if a user is working on a topic branch and they
> > wish to make some changes to intermediate commits or autosquash, they
> > would
,"version"]}
-{"event":"cmd_name","sid":"1547659722619736-11614","thread":"main","time":"2019-01-16T17:28:42.621122Z","file":"git.c","line":432,"name":"version&
From: Jeff Hostetler
Teach Windows version of git to report peak memory usage
during exit() processing.
Signed-off-by: Jeff Hostetler
---
common-main.c| 2 +-
compat/win32/trace2_win32_process_info.c | 50 ++--
trace2.c
From: Jeff Hostetler
Update tr2_tbuf_utc_datetime to generate extended UTC format.
Update tr2_tgt_event target to use extended format in 'time' columns.
Signed-off-by: Jeff Hostetler
---
Documentation/technical/api-trace2.txt | 12 ++--
trace2/tr2_tbuf.c | 4 ++--
From: Jeff Hostetler
Teach Git to resolve the executable directory before initializing
Trace2. This allows the system configuration directory to be
discovered earlier (because it is sometimes relative to the prefix
or runtime-prefix).
This will be used by the next commit to allow trace2 setting
From: Jeff Hostetler
Create trace2_initialize_clock() and call from main() to capture
process start time in isolation and before other sub-systems are
ready.
Signed-off-by: Jeff Hostetler
---
Documentation/technical/api-trace2.txt | 12 ++--
common-main.c | 2 ++
Here is version 2. It addresses most the V1 comments WRT the system config
changes.
It also addresses the format and uniqueness of the SID as discussed in [1].
The SID now containes: the UTC date/time, part of SHA1 of the hostname, and
the PID and is formatted to make it safe for filenames.
It al
From: Jeff Hostetler
Teach git to read the system config (usually "/etc/gitconfig") for
default Trace2 settings. This allows system-wide Trace2 settings to
be installed and inherited to make it easier to manage a collection of
systems.
The original GIT_TR2* environment variables are loaded afte
From: Jeff Hostetler
Add elapsed process time to "start" event to measure
the performance of early process startup.
Signed-off-by: Jeff Hostetler
---
Documentation/technical/api-trace2.txt | 11 ++-
t/t0211-trace2-perf.sh | 12 ++--
trace2.c
From: Phillip Wood
When cherry-picking or reverting a sequence of commits and if the final
pick/revert has conflicts and the user uses `git commit` to commit the
conflict resolution and does not run `git cherry-pick --continue` then
the sequencer state is left behind. This can cause problems late
From: Phillip Wood
If the user commits a conflict resolution using 'git commit' during a
sequence of picks then 'git status' missed the fact that a
cherry-pick/revert is still in progress.
Signed-off-by: Phillip Wood
---
Notes:
I'm not user about printing the oid of the commit that was jus
From: Phillip Wood
See the actual patches for a description of the fixes, I'm not sure
about the second one, see the notes on it. I'm going to be mostly
off-line for the next couple of weeks so it might take me a while to
respond to any comments.
Phillip Wood (2):
commit/reset: try to clean up
On Fri, Mar 29, 2019 at 3:39 AM Nguyễn Thái Ngọc Duy wrote:
>
> This adds a new command 'git-switch' as the half-replacement for
> 'git-checkout'. Jump to 13/27 as the starting point. The other half is
> git-restore, which is dealt with separately.
>
> The sixth time must be the charm, because the
Hi,
On Fri, 29 Mar 2019, SZEDER Gábor wrote:
> [...]
> - Mention in patch 4's commit message that Asciidoctor is still only
> installed in the Documentation build job.
> [...]
>
> Range-diff:
> 1: 8026f62876 = 1: 8026f62876 Documentation/git-diff-tree.txt: fix
> formatting
> 2: fd19cf4b
Hi Phillip,
On Fri, 29 Mar 2019, Phillip Wood wrote:
> From: Phillip Wood
>
> Before commit 356ee4659b ("sequencer: try to commit without forking 'git
> commit'", 2017-11-24) when --signoff or -x were given on the command
> line the commit message was cleaned up with --cleanup=space or
> commit.
Hi Denton,
On Thu, 28 Mar 2019, Denton Liu wrote:
> A common scenario is if a user is working on a topic branch and they
> wish to make some changes to intermediate commits or autosquash, they
> would run something such as
>
> git rebase -i --onto master... master
>
> in order to preserve t
On Fri, Mar 29, 2019 at 3:42 AM Nguyễn Thái Ngọc Duy wrote:
>
> Unless you know what you're doing, switching to another branch to do
> something then switching back could be confusing. Worse, you may even
> forget that you're in the middle of something. By the time you realize,
> you may have done
Hi Thomas,
On Thu, 28 Mar 2019, Thomas Gummerer wrote:
> On 03/22, Matheus Tavares wrote:
> >
> > diff --git a/builtin/clone.c b/builtin/clone.c
> > index 50bde99618..b76f33c635 100644
> > --- a/builtin/clone.c
> > +++ b/builtin/clone.c
> > @@ -443,7 +443,7 @@ static void copy_or_link_directory(s
Hi Phillip,
On Fri, Mar 29, 2019 at 4:04 AM Phillip Wood wrote:
> On 28/03/2019 17:39, Elijah Newren wrote:
> > On Thu, Mar 28, 2019 at 9:23 AM Phillip Wood
> > wrote:
> >> On 28/03/2019 11:04, Duy Nguyen wrote:
> >>> Just so we're clear, what is your "the way" to go? to remove
> >>> CHERRY_HE
Hi!
As you may have noticed, I sent you an email from your account.
This means that I have full access to your account: At the time of hacking your
account(git@vger.kernel.org) had this password: whoworg
You can say: this is my, but old password!
Or: I can change my password at any time!
Of co
Hi Ævar,
On Wed, 27 Mar 2019, Johannes Schindelin wrote:
> On Tue, 26 Mar 2019, Ævar Arnfjörð Bjarmason wrote:
>
> > On Mon, Mar 25 2019, Johannes Schindelin via GitGitGadget wrote:
> >
> > > From: Johannes Schindelin
> > >
> > > Since 7ded055401 (build: do not install git-remote-testgit, 2013-0
On Thu, Mar 28, 2019 at 7:10 PM Thomas Gummerer wrote:
>
> On 03/22, Matheus Tavares wrote:
> > There is currently an odd behaviour when locally clonning a repository
> > with symlinks at .git/objects: using --no-hardlinks all symlinks are
> > dereferenced but without it Git will try to hardlink t
On Thu, Mar 28, 2019 at 6:49 PM Thomas Gummerer wrote:
>
> On 03/22, Matheus Tavares wrote:
> > From: Ævar Arnfjörð Bjarmason
> >
> > Add tests for what happens when we perform a local clone on a repo
> > containing odd files at .git/object directory, such as symlinks to other
> > dirs, or unknow
On Fri, Mar 29 2019, Jeff King wrote:
> On Thu, Mar 28, 2019 at 09:04:56PM +0100, Ævar Arnfjörð Bjarmason wrote:
>
>> Add a test for the error() case in alt_odb_usable() where an alternate
>> directory doesn't exist. This behavior has been the same since
>> 26125f6b9b ("detect broken alternates.
On Thu, Mar 28, 2019 at 11:14 PM Olga Telezhnaya
wrote:
>
> Unfortunately, I can't consult you properly about structure of
> pretty.c. I guess that would be your first task of the internship to
> dive into it and think how to improve it. By the way, you could try to
> make more detailed documentat
On Thu, Mar 28, 2019 at 09:04:56PM +0100, Ævar Arnfjörð Bjarmason wrote:
> Add a test for the error() case in alt_odb_usable() where an alternate
> directory doesn't exist. This behavior has been the same since
> 26125f6b9b ("detect broken alternates.", 2006-02-22), but if that
> error() was turne
On Fri, Mar 29, 2019 at 01:10:19PM +, Kurt Ablinger wrote:
> in Linux the git-client accepts (add, commit, push) files with '?'
> (questionmark) in its name.
>
> When cloning such a repository into Eclipse (eGit/jGit) the
> repository-clone is rejected with an 'Invalid Path'-message with th
Hello,
in Linux the git-client accepts (add, commit, push) files with '?'
(questionmark) in its name.
When cloning such a repository into Eclipse (eGit/jGit) the repository-clone is
rejected with an 'Invalid Path'-message with the ?-filename.
Under Linux it is possible to create a clone (the
On Thu, Mar 28, 2019 at 7:19 PM Thomas Gummerer wrote:
>
> On 03/22, Matheus Tavares wrote:
> > Add the possibility of giving flags to dir_iterator_begin to initialize
> > a dir-iterator with special options.
> >
> > Currently possible flags are DIR_ITERATOR_PEDANTIC, which makes
> > dir_iterator_
On Fri, 29 Mar 2019, Peter Toye wrote:
> I'm looking for a way of comparing the files in two branches.
> According to Stack Overflow there's a git diff command but I can't
> see any reference to it in the book. Am I being more than usually
> thick?
it should be just
$ git diff --
rday
-
I'm looking for a way of comparing the files in two branches. According to
Stack Overflow there's a git diff command but I can't see any reference to it
in the book. Am I being more than usually thick?
The Git Gui app doesn't seem to have that command in it either. A bit
frustrating.
Yours,
Asciidoctor versions v1.5.7 or later print the following warning while
building the documentation:
ASCIIDOC technical/protocol-v2.html
asciidoctor: WARNING: protocol-v2.txt: line 38: unterminated listing block
This highlights an issue (even with older Asciidoctor versions) where
the 'Init
When our '.travis.yml' was split into several 'ci/*' scripts [1], the
installation of the 'asciidoctor' gem somehow ended up in
'ci/test-documentation.sh'.
Install it in 'ci/install-dependencies.sh', where we install other
dependencies of the Documentation build job as well (asciidoc,
xmlto).
[1]
The first three patches fix formatting issues with Asciidoctor, while
the last three patches are a small cleanup and fixes to the
documentation CI build jobs; notably patch 5 un-breaks the
documentation build job on Travis CI in the era of Asciidoctor v2.0.0
[1], and patch 6 fixes some forever-brok
Asciidoctor versions v1.5.7 or later print the following warning while
building the documentation:
ASCIIDOC technical/api-config.html
asciidoctor: WARNING: api-config.txt: line 232: unterminated listing block
This highlight an issue (even with older Asciidoctor versions) where
the length
In 'ci/test-documentation.sh' we save the standard error of 'make
doc', and, in an attempt to make sure that neither AsciiDoc nor
Asciidoctor printed any warnings, we check the emptiness of the
resulting file with '! test -s stderr.log'. This check has never
actually worked, because in our 'ci/*'
Asciidoctor versions v1.5.7 or later print the following warning while
building the documentation:
ASCIIDOC git-diff-tree.xml
asciidoctor: WARNING: diff-format.txt: line 2: unterminated listing block
This highlights an issue (even with older Asciidoctor versions) where
the "Raw output for
The release of Asciidoctor v2.0.0 two days ago broke our documentation
build job on Travis CI, where we 'gem install asciidoctor', which
always brings us the latest and (supposedly) greatest. Alas, we are
not ready for that just yet, because it removed support for DocBook
4.5, and we have been req
On Fri, Mar 29, 2019 at 3:00 AM Thomas Gummerer wrote:
>
>
> I had previously mentioned that this project was attempted already in
> my email at [*1*]. Did you take a look at the thread I linked to
> there, and the regex used? I still feel like that previous experience
> is something you could l
On Fri, Mar 29, 2019 at 6:04 PM Phillip Wood wrote:
> > I am especially concerned with the idea of
> > having something like "git switch --ignore-in-progress
> > --discard-changes" being used to quit merges or cherry-picks or
> > reverts or even rebases. In my opinion, doing so is creating flags t
From: Phillip Wood
Before commit 356ee4659b ("sequencer: try to commit without forking 'git
commit'", 2017-11-24) when --signoff or -x were given on the command
line the commit message was cleaned up with --cleanup=space or
commit.cleanup if it was set. Unfortunately this behavior was lost when
I
Hi Elijah
On 28/03/2019 17:39, Elijah Newren wrote:
Hi Phillip,
On Thu, Mar 28, 2019 at 9:23 AM Phillip Wood wrote:
On 28/03/2019 11:04, Duy Nguyen wrote:
On Wed, Mar 27, 2019 at 5:24 PM Phillip Wood wrote:
On 26/03/2019 15:48, Elijah Newren wrote:
On Tue, Mar 26, 2019 at 8:24 AM Duy Nguy
The new command "git switch" is added to avoid the confusion of
one-command-do-all "git checkout" for new users. They are also helpful
to avoid ambiguation context.
For these reasons, promote it everywhere possible. This includes
documentation, suggestions/advice from other commands...
The "Check
Switching and creating branches always involves knowing the
to begin the new branch from. Sometimes, people want to
create a new branch that does not have any commits yet; --orphan is a
flag to allow that.
--orphan overrides the default of HEAD for instead causing
us to start from an empty histo
"git checkout " will checkout the commit in question and
detach HEAD from the current branch. It is naturally a right thing to
do once you get git references. But detached HEAD is a scary concept
to new users because we show a lot of warnings and stuff, and it could
be hard to get out of (until you
"git checkout" automatically detaches branches and --detach is not
that useful (--no-detach is more likely). But for "switch", you
may want to use it more often once you're used to detached HEAD. This
of course adds -d to git-checkout but it does not harm (yet?) to do it.
Signed-off-by: Nguyễn Thá
When we switch from one branch to another, it makes sense to show a
summary of local changes since there could be conflicts, or some files
left modified When switch is used solely for creating a new
branch (and "switch" to the same commit) or detaching, we don't really
need to show anything.
"
"git checkout" can be executed without any arguments. What it does is
not exactly great: it switches from HEAD to HEAD and shows worktree
modification as a side effect.
Make switch reject this case. Just use "git status" if you want
that side effect. For switch, you have to either
- really switch
This is already the default in git-checkout. The real change in here is
just minor cleanup. The main excuse is to explain why dwim is kept default.
Contrary to detach mode that is easy to get into and confusing to get
back out. Automatically creating a tracking branch often does not kick
in as oft
Unless you know what you're doing, switching to another branch to do
something then switching back could be confusing. Worse, you may even
forget that you're in the middle of something. By the time you realize,
you may have done a ton of work and it gets harder to go back.
A new option --ignore-in
Completion support for --guess could be made better. If no --detach is
given, we should only provide a list of refs/heads/* and dwim ones,
not the entire ref space. But I still can't penetrate that
__git_refs() function yet.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
contrib/completion/git-completi
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/t2060-switch.sh (new +x) | 96 ++
1 file changed, 96 insertions(+)
diff --git a/t/t2060-switch.sh b/t/t2060-switch.sh
new file mode 100755
index 00..f9efa29dfb
--- /dev/null
+++ b/t/t2060-switch.sh
@@ -0,0 +1,9
This command is about switching branch (or creating a new one) and
should not accept pathspec. This helps simplify ambiguation
handling. The other two ("git checkout" and "git restore") of
course do accept pathspec as before.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout.c | 20 ++
The shortcut of these options do not make much sense when used with
switch. And their descriptions are also tied to checkout. Move -b/-B
to cmd_checkout() and new -c/-C with the same functionality in
cmd_switch_branch()
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout.c | 32
--discard-changes is a better name than --force for this option since
it's what really happens. --force is turned to an alias for
--discard-changes. But it's meant to be an alias for potentially more
force options in the future.
Side note. It's not obvious from the patch but --discard-changes also
This option is ancient. Nowadays reflog is enabled by default and
automatically created for new branches. Keep it in git-checkout only.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/checkout.c b/builtin/chec
These local variables are referenced by struct option[]. This struct
will soon be broken down, moved away and we can't rely on local
variables anymore. Move these two to struct checkout_opts in
preparation for that.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout.c | 17 ++--
"git checkout" doing too many things is a source of confusion for many
users (and it even bites old timers sometimes). To remedy that, the
command will be split into two new ones: switch and restore. The good
old "git checkout" command is still here and will be until all (or most
of users) are sick
This is a preparation step for introducing new commands that do parts
of what checkout does. There will be two new commands, one is about
switching branches, detaching HEAD... one about checking out
paths. These share the a subset of command line options. The rest of
command line options are separa
"opts" will soon be moved out of cmd_checkout(). To keep changes in
that patch smaller, convert "opts" to a pointer and keep the real
thing behind "real_opts".
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout.c | 115 +++--
1 file changed, 58 inser
The include list becomes very long and frankly a bit unorganized. With
the exception of builtin.h, cache.h or git-compat-util.h which have to
come first, keep the rest sorted.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout.c | 34 +-
1 file changed, 17 i
The old name does not really say that this is about 'checkout -b'. See
49d833dc07 (Revert "checkout branch: prime cache-tree fully" -
2009-05-12) for more information
Signed-off-by: Nguyễn Thái Ngọc Duy
---
t/{t2014-switch.sh => t2014-checkout-switch.sh} | 0
1 file changed, 0 insertions(+), 0 d
1 - 100 of 109 matches
Mail list logo