<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/archive.c, branch v2.6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.6.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-08-03T18:01:27Z</updated>
<entry>
<title>Merge branch 'jk/date-mode-format'</title>
<updated>2015-08-03T18:01:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-03T18:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d939af12bd96db7ad3e671a0585ad8570aa7e9d3'/>
<id>urn:sha1:d939af12bd96db7ad3e671a0585ad8570aa7e9d3</id>
<content type='text'>
Teach "git log" and friends a new "--date=format:..." option to
format timestamps using system's strftime(3).

* jk/date-mode-format:
  strbuf: make strbuf_addftime more robust
  introduce "format" date-mode
  convert "enum date_mode" into a struct
  show-branch: use DATE_RELATIVE instead of magic number
</content>
</entry>
<entry>
<title>convert "enum date_mode" into a struct</title>
<updated>2015-06-29T18:39:07Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-06-25T16:55:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a5481a6c9438cbd9c246cfa59ff49c31a0926fb6'/>
<id>urn:sha1:a5481a6c9438cbd9c246cfa59ff49c31a0926fb6</id>
<content type='text'>
In preparation for adding date modes that may carry extra
information beyond the mode itself, this patch converts the
date_mode enum into a struct.

Most of the conversion is fairly straightforward; we pass
the struct as a pointer and dereference the type field where
necessary. Locations that declare a date_mode can use a "{}"
constructor.  However, the tricky case is where we use the
enum labels as constants, like:

  show_date(t, tz, DATE_NORMAL);

Ideally we could say:

  show_date(t, tz, &amp;{ DATE_NORMAL });

but of course C does not allow that. Likewise, we cannot
cast the constant to a struct, because we need to pass an
actual address. Our options are basically:

  1. Manually add a "struct date_mode d = { DATE_NORMAL }"
     definition to each caller, and pass "&amp;d". This makes
     the callers uglier, because they sometimes do not even
     have their own scope (e.g., they are inside a switch
     statement).

  2. Provide a pre-made global "date_normal" struct that can
     be passed by address. We'd also need "date_rfc2822",
     "date_iso8601", and so forth. But at least the ugliness
     is defined in one place.

  3. Provide a wrapper that generates the correct struct on
     the fly. The big downside is that we end up pointing to
     a single global, which makes our wrapper non-reentrant.
     But show_date is already not reentrant, so it does not
     matter.

This patch implements 3, along with a minor macro to keep
the size of the callers sane.

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>refs: move the remaining ref module declarations to refs.h</title>
<updated>2015-06-22T20:17:12Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-06-22T14:03:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fb58c8d50734c14a90f3e4e7dd99f36e4f37c4e6'/>
<id>urn:sha1:fb58c8d50734c14a90f3e4e7dd99f36e4f37c4e6</id>
<content type='text'>
Some functions from the refs module were still declared in cache.h.
Move them to refs.h.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/object-id'</title>
<updated>2015-05-06T04:00:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-06T04:00:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a916cb5fb4824322d7e99b1b0efad4e6d7850e78'/>
<id>urn:sha1:a916cb5fb4824322d7e99b1b0efad4e6d7850e78</id>
<content type='text'>
Identify parts of the code that knows that we use SHA-1 hash to
name our objects too much, and use (1) symbolic constants instead
of hardcoded 20 as byte count and/or (2) use struct object_id
instead of unsigned char [20] for object names.

* bc/object-id:
  apply: convert threeway_stage to object_id
  patch-id: convert to use struct object_id
  commit: convert parts to struct object_id
  diff: convert struct combine_diff_path to object_id
  bulk-checkin.c: convert to use struct object_id
  zip: use GIT_SHA1_HEXSZ for trailers
  archive.c: convert to use struct object_id
  bisect.c: convert leaf functions to use struct object_id
  define utility functions for object IDs
  define a structure for object IDs
</content>
</entry>
<entry>
<title>archive.c: convert to use struct object_id</title>
<updated>2015-03-14T05:43:12Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-03-13T23:39:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13609673c4410df754197ec4ae9b57f15bc803d4'/>
<id>urn:sha1:13609673c4410df754197ec4ae9b57f15bc803d4</id>
<content type='text'>
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>standardize usage info string format</title>
<updated>2015-01-14T17:32:04Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2015-01-13T07:44:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9c9b4f2f8b7f27f3984e80d053106d5d41cbb03b'/>
<id>urn:sha1:9c9b4f2f8b7f27f3984e80d053106d5d41cbb03b</id>
<content type='text'>
This patch puts the usage info strings that were not already in docopt-
like format into docopt-like format, which will be a litle easier for
end users and a lot easier for translators. Changes include:

- Placing angle brackets around fill-in-the-blank parameters
- Putting dashes in multiword parameter names
- Adding spaces to [-f|--foobar] to make [-f | --foobar]
- Replacing &lt;foobar&gt;* with [&lt;foobar&gt;...]

Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Reviewed-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tree.c: update read_tree_recursive callback to pass strbuf as base</title>
<updated>2014-12-01T19:32:29Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-11-30T09:05:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a0b0b6de996e2ac7eeb951e3d08f577c11c7e54'/>
<id>urn:sha1:6a0b0b6de996e2ac7eeb951e3d08f577c11c7e54</id>
<content type='text'>
This allows the callback to use 'base' as a temporary buffer to
quickly assemble full path "without" extra allocation. The callback
has to restore it afterwards of course.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/archive-pathspec'</title>
<updated>2014-10-08T20:05:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-08T20:05:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2c45f5b961b3b5d894fb723d2031e8ff41cadf7'/>
<id>urn:sha1:b2c45f5b961b3b5d894fb723d2031e8ff41cadf7</id>
<content type='text'>
"git archive" learned to filter what gets archived with pathspec.

* nd/archive-pathspec:
  archive: support filtering paths with glob
</content>
</entry>
<entry>
<title>archive: support filtering paths with glob</title>
<updated>2014-09-22T19:04:29Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-09-21T03:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed22b4173bd8d6dbce6236480bd30a63dd54834e'/>
<id>urn:sha1:ed22b4173bd8d6dbce6236480bd30a63dd54834e</id>
<content type='text'>
This patch fixes two problems with using :(glob) (or even "*.c"
without ":(glob)").

The first one is we forgot to turn on the 'recursive' flag in struct
pathspec. Without that, tree_entry_interesting() will not mark
potential directories "interesting" so that it can confirm whether
those directories have anything matching the pathspec.

The marking directories interesting has a side effect that we need to
walk inside a directory to realize that there's nothing interested in
there. By that time, 'archive' code has already written the (empty)
directory down. That means lots of empty directories in the result
archive.

This problem is fixed by lazily writing directories down when we know
they are actually needed. There is a theoretical bug in this
implementation: we can't write empty trees/directories that match that
pathspec.

path_exists() is also made stricter in order to detect non-matching
pathspec because when this 'recursive' flag is on, we most likely
match some directories. The easiest way is not consider any
directories "matched".

Noticed-by: Peter Wu &lt;peter@lekensteyn.nl&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>archive.c: replace `git_config()` with `git_config_get_bool()` family</title>
<updated>2014-08-07T20:33:27Z</updated>
<author>
<name>Tanay Abhra</name>
<email>tanayabh@gmail.com</email>
</author>
<published>2014-08-07T16:21:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=95790ff60d35e6a9e212fa0f9ffedaabddd1182c'/>
<id>urn:sha1:95790ff60d35e6a9e212fa0f9ffedaabddd1182c</id>
<content type='text'>
Use `git_config_get_bool()` family instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.

Signed-off-by: Tanay Abhra &lt;tanayabh@gmail.com&gt;
Reviewed-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
