<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/replace.c, 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>2021-11-26T06:15:07Z</updated>
<entry>
<title>run-command API users: use strvec_pushl(), not argv construction</title>
<updated>2021-11-26T06:15:07Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-11-25T22:52:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=2b7098936c9e91d527aa53b8d4af0b25d7e912b4'/>
<id>urn:sha1:2b7098936c9e91d527aa53b8d4af0b25d7e912b4</id>
<content type='text'>
Change a pattern of hardcoding an "argv" array size, populating it and
assigning to the "argv" member of "struct child_process" to instead
use "strvec_pushl()" to add data to the "args" member.

This implements the same behavior as before in fewer lines of code,
and moves us further towards being able to remove the "argv" member in
a subsequent commit.

Since we've entirely removed the "argv" variable(s) we can be sure
that no potential logic errors of the type discussed in a preceding
commit are being introduced here, i.e. ones where the local "argv" was
being modified after the assignment to "struct child_process"'s
"argv".

Signed-off-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>advice: move advice.graftFileDeprecated squashing to commit.[ch]</title>
<updated>2021-08-25T19:07:52Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-08-23T10:44:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ab628588f80e8dd889b700515c41548c1a356dcc'/>
<id>urn:sha1:ab628588f80e8dd889b700515c41548c1a356dcc</id>
<content type='text'>
Move the squashing of the advice.graftFileDeprecated advice over to an
external variable in commit.[ch], allowing advice() to purely use the
new-style API of invoking advice() with an enum.

See 8821e90a09a (advice: don't pointlessly suggest
--convert-graft-file, 2018-11-27) for why quieting this advice was
needed. It's more straightforward to move this code to commit.[ch] and
use it builtin/replace.c, than to go through the indirection of
advice.[ch].

Because this was the last advice_config variable we can remove that
old facility from advice.c.

Signed-off-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>strvec: rename struct fields</title>
<updated>2020-07-31T02:18:06Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-29T00:37:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=d70a9eb611a9d242c1d26847d223b8677609305b'/>
<id>urn:sha1:d70a9eb611a9d242c1d26847d223b8677609305b</id>
<content type='text'>
The "argc" and "argv" names made sense when the struct was argv_array,
but now they're just confusing. Let's rename them to "nr" (which we use
for counts elsewhere) and "v" (which is rather terse, but reads well
when combined with typical variable names like "args.v").

Note that we have to update all of the callers immediately. Playing
tricks with the preprocessor is hard here, because we wouldn't want to
rewrite unrelated tokens.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strvec: convert builtin/ callers away from argv_array name</title>
<updated>2020-07-28T22:02:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-28T20:24:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=22f9b7f3f59549735a480042a4b9ce292eedfae0'/>
<id>urn:sha1:22f9b7f3f59549735a480042a4b9ce292eedfae0</id>
<content type='text'>
We eventually want to drop the argv_array name and just use strvec
consistently. There's no particular reason we have to do it all at once,
or care about interactions between converted and unconverted bits.
Because of our preprocessor compat layer, the names are interchangeable
to the compiler (so even a definition and declaration using different
names is OK).

This patch converts all of the files in builtin/ to keep the diff to a
manageable size.

The conversion was done purely mechanically with:

  git ls-files '*.c' '*.h' |
  xargs perl -i -pe '
    s/ARGV_ARRAY/STRVEC/g;
    s/argv_array/strvec/g;
  '

and then selectively staging files with "git add builtin/". We'll deal
with any indentation/style fallouts separately.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sha1-file: pass git_hash_algo to hash_object_file()</title>
<updated>2020-01-31T18:45:39Z</updated>
<author>
<name>Matheus Tavares</name>
<email>matheus.bernardino@usp.br</email>
</author>
<published>2020-01-30T20:32:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=2dcde20e1c55fc2e3f9e9e6d48e93c39ec5661d2'/>
<id>urn:sha1:2dcde20e1c55fc2e3f9e9e6d48e93c39ec5661d2</id>
<content type='text'>
Allow hash_object_file() to work on arbitrary repos by introducing a
git_hash_algo parameter. Change callers which have a struct repository
pointer in their scope to pass on the git_hash_algo from the said repo.
For all other callers, pass on the_hash_algo, which was already being
used internally at hash_object_file(). This functionality will be used
in the following patch to make check_object_signature() be able to work
on arbitrary repos (which, in turn, will be used to fix an
inconsistency at object.c:parse_object()).

Signed-off-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/object-id-part17'</title>
<updated>2019-10-11T05:24:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-10-11T05:24:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=676278f8ea1b9bdd8f235eceb739d7aec4f0ed67'/>
<id>urn:sha1:676278f8ea1b9bdd8f235eceb739d7aec4f0ed67</id>
<content type='text'>
Preparation for SHA-256 upgrade continues.

* bc/object-id-part17: (26 commits)
  midx: switch to using the_hash_algo
  builtin/show-index: replace sha1_to_hex
  rerere: replace sha1_to_hex
  builtin/receive-pack: replace sha1_to_hex
  builtin/index-pack: replace sha1_to_hex
  packfile: replace sha1_to_hex
  wt-status: convert struct wt_status to object_id
  cache: remove null_sha1
  builtin/worktree: switch null_sha1 to null_oid
  builtin/repack: write object IDs of the proper length
  pack-write: use hash_to_hex when writing checksums
  sequencer: convert to use the_hash_algo
  bisect: switch to using the_hash_algo
  sha1-lookup: switch hard-coded constants to the_hash_algo
  config: use the_hash_algo in abbrev comparison
  combine-diff: replace GIT_SHA1_HEXSZ with the_hash_algo
  bundle: switch to use the_hash_algo
  connected: switch GIT_SHA1_HEXSZ to the_hash_algo
  show-index: switch hard-coded constants to the_hash_algo
  blame: remove needless comparison with GIT_SHA1_HEXSZ
  ...
</content>
</entry>
<entry>
<title>use get_tagged_oid()</title>
<updated>2019-09-05T21:11:34Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-09-05T19:59:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c77722b3ea42a87381915f1203648a5f5d86c1ff'/>
<id>urn:sha1:c77722b3ea42a87381915f1203648a5f5d86c1ff</id>
<content type='text'>
Avoid derefencing -&gt;tagged without checking for NULL by using the
convenience wrapper for getting the ID of the tagged object.  It die()s
when encountering a broken tag instead of segfaulting.

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>builtin/replace: make hash size independent</title>
<updated>2019-08-19T22:04:57Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2019-08-18T20:04:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=28ba1830d0533007d5cbc1110880c6599296029a'/>
<id>urn:sha1:28ba1830d0533007d5cbc1110880c6599296029a</id>
<content type='text'>
Instead of using GIT_SHA1_HEXSZ and hard-coded constants, switch to
using the_hash_algo.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cc/replace-graft-peel-tags'</title>
<updated>2019-05-08T15:37:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-08T15:37:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ce2a18f2b1dd71966c00109f3da42df64bb836dd'/>
<id>urn:sha1:ce2a18f2b1dd71966c00109f3da42df64bb836dd</id>
<content type='text'>
When given a tag that points at a commit-ish, "git replace --graft"
failed to peel the tag before writing a replace ref, which did not
make sense because the old graft mechanism the feature wants to
mimick only allowed to replace one commit object with another.
This has been fixed.

* cc/replace-graft-peel-tags:
  replace: peel tag when passing a tag first to --graft
  replace: peel tag when passing a tag as parent to --graft
  t6050: redirect expected error output to a file
  t6050: use test_line_count instead of wc -l
</content>
</entry>
<entry>
<title>replace: peel tag when passing a tag first to --graft</title>
<updated>2019-04-15T02:33:23Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2019-03-31T13:46:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ee521ec4cb09981c14ec32aca370b5ff5d15c4d9'/>
<id>urn:sha1:ee521ec4cb09981c14ec32aca370b5ff5d15c4d9</id>
<content type='text'>
When passing a tag as the first argument to `git replace --graft`,
it can be useful to accept it and use the underlying commit as a
the commit that will be replaced.

This already works for lightweight tags, but unfortunately
for annotated tags we have been using the hash of the tag object
instead of the hash of the underlying commit.

Especially we would pass the hash of the tag object to
replace_object_oid() where we would likely fail with an error
like:

"error: Objects must be of the same type.
'annotated_replaced_object' points to a replaced object of type 'tag'
while 'replacement' points to a replacement object of type 'commit'."

This patch fixes that by using the hash of the underlying commit
when an annotated tag is passed.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
