<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2022-01-29T00:45:52Z</updated>
<entry>
<title>Merge branch 'en/keep-cwd' into maint</title>
<updated>2022-01-29T00:45:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-29T00:45:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f120b65cd41c0e93432af1a36c82fd3a8d39ccd4'/>
<id>urn:sha1:f120b65cd41c0e93432af1a36c82fd3a8d39ccd4</id>
<content type='text'>
Fix a regression in 2.35 that roke the use of "rebase" and "stash"
in a secondary worktree.

* en/keep-cwd:
  sequencer, stash: fix running from worktree subdir
</content>
</entry>
<entry>
<title>sequencer, stash: fix running from worktree subdir</title>
<updated>2022-01-26T20:01:54Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2022-01-26T01:43:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ff5b7913f0af62c26682b0376d0aa2d7f5d74b2e'/>
<id>urn:sha1:ff5b7913f0af62c26682b0376d0aa2d7f5d74b2e</id>
<content type='text'>
In commits bc3ae46b42 ("rebase: do not attempt to remove
startup_info-&gt;original_cwd", 2021-12-09) and 0fce211ccc ("stash: do not
attempt to remove startup_info-&gt;original_cwd", 2021-12-09), we wanted to
allow the subprocess to know which directory the parent process was
running from, so that the subprocess could protect it.  However...

When run from a non-main worktree, setup_git_directory() will note
that the discovered git directory
(/PATH/TO/.git/worktree/non-main-worktree) does not match
DEFAULT_GIT_DIR_ENVIRONMENT (see setup_discovered_git_dir()), and
decide to set GIT_DIR in the environment.  This matters because...

Whenever git is run with the GIT_DIR environment variable set, and
GIT_WORK_TREE not set, it presumes that '.' is the working tree.  So...

This combination results in the subcommand being very confused about
the working tree.  Fix it by also setting the GIT_WORK_TREE environment
variable along with setting cmd.dir.

A possibly more involved fix we could consider for later would be to
make setup.c set GIT_WORK_TREE whenever (a) it discovers both the git
directory and the working tree and (b) it decides to set GIT_DIR in the
environment.  I did not attempt that here as such would be too big of a
change for a 2.35.1 release.

Test-case-by: Glen Choo &lt;chooglen@google.com&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/checkout-branch-info-leakfix'</title>
<updated>2022-01-24T17:14:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-24T17:14:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c6e19e47a60c0174f805db8e1624db38ff889523'/>
<id>urn:sha1:c6e19e47a60c0174f805db8e1624db38ff889523</id>
<content type='text'>
We added an unrelated sanity checking that leads to a BUG() while
plugging a leak, which triggered in a repository with symrefs in
the local branch namespace that point at a ref outside.  Partially
revert the change to avoid triggering the BUG().

* ab/checkout-branch-info-leakfix:
  checkout: avoid BUG() when hitting a broken repository
</content>
</entry>
<entry>
<title>checkout: avoid BUG() when hitting a broken repository</title>
<updated>2022-01-22T01:04:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-22T00:58:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=519947b69a9ea1461d5f5afc762823835295b3b2'/>
<id>urn:sha1:519947b69a9ea1461d5f5afc762823835295b3b2</id>
<content type='text'>
When 9081a421 (checkout: fix "branch info" memory leaks, 2021-11-16)
cleaned up existing memory leaks, we added an unrelated sanity check
to ensure that a local branch is truly local and not a symref to
elsewhere that dies with BUG() otherwise.  This was misguided in two
ways.  First of all, such a tightening did not belong to a leak-fix
patch.  And the condition it detected was *not* a bug in our program
but a problem in user data, where warning() or die() would have been
more appropriate.

As the condition is not fatal (the result of computing the local
branch name in the code that is involved in the faulty check is only
used as a textual label for the commit), let's revert the code to
the original state, i.e. strip "refs/heads/" to compute the local
branch name if possible, and otherwise leave it NULL.  The consumer
of the information in merge_working_tree() is prepared to see NULL
in there and act accordingly.

cf. https://bugzilla.redhat.com/show_bug.cgi?id=2042920

Reported-by: Petr Šplíchal &lt;psplicha@redhat.com&gt;
Reported-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Helped-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/branch-track-inherit'</title>
<updated>2022-01-20T23:25:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-20T23:25:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=297ca895a27a6bbdb7906371d533f72a12ad25b2'/>
<id>urn:sha1:297ca895a27a6bbdb7906371d533f72a12ad25b2</id>
<content type='text'>
"git branch -h" incorrectly said "--track[=direct|inherit]",
implying that "--trackinherit" is a valid option, which has been
corrected.
source: &lt;3de40324bea6a1dd9bca2654721471e3809e87d8.1642538935.git.steadmon@google.com&gt;
source: &lt;c3c26192-aee9-185a-e559-b8735139e49c@web.de&gt;

* js/branch-track-inherit:
  branch,checkout: fix --track documentation
</content>
</entry>
<entry>
<title>branch,checkout: fix --track documentation</title>
<updated>2022-01-20T19:07:51Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-01-20T12:35:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=6327f0efed36c64d98a140110171362b7cb75a52'/>
<id>urn:sha1:6327f0efed36c64d98a140110171362b7cb75a52</id>
<content type='text'>
Document that the accepted variants of the --track option are --track,
--track=direct, and --track=inherit.  The equal sign in the latter two
cannot be replaced with whitespace; in general optional arguments need
to be attached firmly to their option.

Put "direct" consistently before "inherit", if only for the reasons
that the former is the default, explained first in the documentation,
and comes before the latter alphabetically.

Mention both modes in the short help so that readers don't have to look
them up in the full documentation.  They are literal strings and thus
untranslatable.  PARSE_OPT_LITERAL_ARGHELP is inferred due to the pipe
and parenthesis characters, so we don't have to provide that flag
explicitly.

Mention that -t has the same effect as --track and --track=direct.
There is no way to specify inherit mode using the short option, because
short options generally don't accept optional arguments.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/branch-track-inherit'</title>
<updated>2022-01-19T00:02:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-19T00:02:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=af4e5f569bc89f356eb34a9373d7f82aca6faa8a'/>
<id>urn:sha1:af4e5f569bc89f356eb34a9373d7f82aca6faa8a</id>
<content type='text'>
"git branch -h" incorrectly said "--track[=direct|inherit]",
implying that "--trackinherit" is a valid option, which has been
corrected.

* js/branch-track-inherit:
  branch,checkout: fix --track usage strings
</content>
</entry>
<entry>
<title>branch,checkout: fix --track usage strings</title>
<updated>2022-01-18T22:08:15Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2022-01-18T20:49:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=15f002812f858b49ce7641eb191561843cf31f00'/>
<id>urn:sha1:15f002812f858b49ce7641eb191561843cf31f00</id>
<content type='text'>
As Ævar pointed out in [1], the use of PARSE_OPT_LITERAL_ARGHELP with a
list of allowed parameters is not recommended. Both git-branch and
git-checkout were changed in d311566 (branch: add flags and config to
inherit tracking, 2021-12-20) to use this discouraged combination for
their --track flags.

Fix this by removing PARSE_OPT_LITERAL_ARGHELP, and changing the arghelp
to simply be "mode". Users may discover allowed values in the manual
pages.

[1]: https://lore.kernel.org/git/220111.86a6g3yqf9.gmgdl@evledraar.gmail.com/

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/lockfile-cleanup-fix'</title>
<updated>2022-01-12T23:11:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-12T23:11:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=12f82b0dd70aaefdb9363a96403d41d13b97e5b0'/>
<id>urn:sha1:12f82b0dd70aaefdb9363a96403d41d13b97e5b0</id>
<content type='text'>
Some lockfile code called free() in signal-death code path, which
has been corrected.

* ps/lockfile-cleanup-fix:
  fetch: fix deadlock when cleaning up lockfiles in async signals
</content>
</entry>
<entry>
<title>Merge branch 'en/stash-df-fix'</title>
<updated>2022-01-10T19:52:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-10T19:52:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=6e223455917954f414cea98b00b67aac91e2b619'/>
<id>urn:sha1:6e223455917954f414cea98b00b67aac91e2b619</id>
<content type='text'>
"git stash apply" forgot to attempt restoring untracked files when
it failed to restore changes to tracked ones.

* en/stash-df-fix:
  stash: do not return before restoring untracked files
</content>
</entry>
</feed>
