Author Commit Message Date Builds
Thomas Rast
prefix_filename(): safely handle the case where pfx_len=0 Current prefix_filename() is proofed against the case where the prefix 'pfx' is NULL or a 0-length string, _except on Windows_. Change the behaviour to work the same on both platforms, and only check pfx_len so that callers passing a NULL prefix with a nonzero pfx_len segfault early on both. Signed-off-by: Thomas Rast <> Signed-off-by: Junio C Hamano <>
Jonathan Nieder
t4203 (mailmap): stop hardcoding commit ids and dates A seemingly innocuous change like adding test_tick somewhere can completely upset the final mailmap test, since it checks commit hashes and dates. Make the test less fragile by fuzzing away the unpredictable parts and leaving in the authors (which is what the test is about, anyway). Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Christoph Mallon
diff --check: correct line numbers of new blank lines at EOF The whitespace check printed the value of the wrong variable, i.e. the beginning of the block of blank lines at the EOF (possibly absent) in the old file. As "git diff --check" is used by users to check their changes before making a commit, we should point at the line number in the file after the change. Signed-off-by: Christoph Mallon <> Signed-off-by: Junio C Hamano <git…
Jim Meyering
mailmap: fix use of freed memory On an x86_64 system (F13-based), I ran these commands in an empty directory: git init printf '%s\n' \ '<> <jdoe@example.COM>' \ 'John <>' > .mailmap git shortlog < /dev/null Here's the result: (reading log message from standard input) *** glibc detected *** git: free(): invalid pointer: 0x0000000000f53730 *** ======= Backtrace:…
Luck, Tony
Better advice on using topic branches for kernel development Linus Torvalds wrote: > The real problem is that maintainers often pick random - and not at > all stable - points for their development to begin with. They just > pick some random "this is where Linus -git tree is today", and do > their development on top of that. THAT is the problem - they are > unaware that there's some nasty bug in that version. Maybe they do this because they read it in the G…
Jonathan Nieder
Documentation: update implicit "--no-index" behavior in "git diff" Originally "--no-index" mode triggered for untracked files within the tracked tree, but with v1.5.6-rc1~41 (Merge branch 'jc/diff-no-no-index, 2008-05-26) the command was fixed to only implicitly trigger when paths outside the tracked tree are mentioned. Reported-by: Yann Dirson <> Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <…
Jonathan Nieder
Documentation: expand 'git diff' SEE ALSO section Point in many directions in the hope of helping the reader find what is needed more quickly. This commit also removes the summary attached to the SEE ALSO entry for difftool, to avoid making the SEE ALSO list too verbose. If the reader wants a summary of the commands referred to, she can always look to the top of the named pages or to the table of contents on the main git(1) page. Suggested-by:…
Jonathan Nieder
Documentation: diff can compare blobs Meanwhile, there is no plumbing command to compare two blobs. Strange. Reported-by: Yann Dirson <> Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Jonathan Nieder
Documentation: gitrevisions is in section 7 Fix references to gitrevisions(1) in the manual pages and HTML documentation. In practice, this will not matter much unless someone tries to use a hard copy of the git reference manual. Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Jeff King
rev-list: handle %x00 NUL in user format The code paths for showing commits in "git log" and "git rev-list --graph" correctly handle embedded NULs by looking only at the resulting strbuf's length, and never treating it as a C string. The code path for regular rev-list, however, used printf("%s"), which resulted in truncated output. This patch uses fwrite instead, like the --graph code path. Signed-off-by: Jeff King <> Signe…
Andreas Köhler
submodule sync: Update "submodule.<name>.url" for empty directories If a submodule directory has not been filled by "git submodule update" yet, then "git submodule sync" must still update the super-project's configuration for submodule.<name>.url. This situation occurs when switching between branches with a module from different urls and other branches without the submodule. Signed-off-by: Andreas Köhler <> Signed-off-by: Junio C Hamano <gitster@…
Anders Kaseorg
apply: Recognize epoch timestamps with : in the timezone Some patches have a timezone formatted like ‘-08:00’ instead of ‘-0800’ (e.g., so git apply would fail to recognize the epoch timestamp of deleted files and would create empty files instead. Teach it to support both formats, and add a test case. Signed-off-by: Anders Kaseorg <> Signed-off-by: Junio C Hamano <>
Junio C Hamano
shell portability: no "export VAR=VAL" It is more portable to say "VAR=VAL && export VAR" instead. Noticed by Ævar. Signed-off-by: Junio C Hamano <>
Junio C Hamano
CodingGuidelines: reword parameter expansion section Group entries related to parameter substitutions together and avoid using the word "regexp" to refer to the ${parameter/pattern/string} substitution (banned), as the pattern there is a shell glob and not a regular expression. Signed-off-by: Junio C Hamano <>
Bert Wesarg
Documentation: update-index: -z applies also to --index-info Signed-off-by: Bert Wesarg <> Signed-off-by: Junio C Hamano <>
Jonathan Nieder
Documentation: No argument of ALLOC_GROW should have side-effects The explanatory comment before the definition of ALLOC_GROW carefully lists arguments that will be used more than once and thus cannot have side-effects; a lazy reader might conclude that the arguments not listed are used only once and side effects safe. Correct it to list all three arguments, avoiding this confusion. Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Ham…
Štěpán Němec
Fix {update,checkout}-index usage strings The `<file>' argument is optional in both cases (the man pages are already correct). Signed-off-by: Štěpán Němec <> Acked-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Štěpán Němec
Put a space between `<' and argument in pack-objects usage string This makes it cosistent with other places (including the git-pack-objects(1) manpage itself) and avoids possible confusion (I, for one, mistook `<object-list' for a `<object-list>' typo at first when preparing this series). Signed-off-by: Štěpán Němec <> Acked-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Štěpán Němec
Remove stray quotes in --pretty and --format documentation Quotes (for emphasis) are used in option explanations, not the headings. Signed-off-by: Štěpán Němec <> Acked-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Štěpán Němec
Use parentheses and `...' where appropriate Remove some stray usage of other bracket types and asterisks for the same purpose. Signed-off-by: Štěpán Němec <> Acked-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Štěpán Němec
Fix odd markup in --diff-filter documentation Instead of using the regex-like bracket expression, use grouping to make it more consistent with other similar places. The brackets now have the same meaning as in other documentation (i.e., the argument is optional). Signed-off-by: Štěpán Němec <> Mentored-and-Acked-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Štěpán Němec
Use angles for placeholders consistently Signed-off-by: Štěpán Němec <> Acked-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Yann Dirson
t/t3415: use && where applicable. Signed-off-by: Yann Dirson <> Signed-off-by: Junio C Hamano <>
Ramkumar Ramachandra
SubmittingPatches: Document some extra tags used in commit messages Document the meanings of the tags "Reported-by:", "Acked-by:", "Reviewed-by:" and "Tested-by:" clearly. Also mention that the user is free to use any custom tags. Helped-by: Jonathan Nieder <> Liked-by: Sverre Rabbelier <> Signed-off-by: Ramkumar Ramachandra <> Signed-off-by: Junio C Hamano <>
Uwe Kleine-König
Documentation/git-clone: describe --mirror more verbosely Some people in #linux-rt noticed that describing what "--mirror" option does with "it mirrors" is way insufficient. Cc: Steven Rostedt <> Cc: Darren 'Some People' Hart <> Cc: Michael J Gruber <> Signed-off-by: Uwe Kleine-König <> Signed-off-by: Junio C Hamano <>
Erik Faye-Lund
do not depend on signed integer overflow Signed integer overflow is not defined in C, so do not depend on it. This fixes a problem with GCC 4.4.0 and -O3 where the optimizer would consider "consumed_bytes > consumed_bytes + bytes" as a constant expression, and never execute the die()-call. Signed-off-by: Erik Faye-Lund <> Acked-by: Nicolas Pitre <> Signed-off-by: Junio C Hamano <>
René Scharfe
work around buggy S_ISxxx(m) implementations There are buggy implementations of S_ISxxx(m) macros on some platforms (e.g. NetBSD). The issue is that NetBSD doesn't take care to wrap its macro arguments in parentheses, so on Linux and sane systems we have S_ISREG(m) defined as something like: (((m) & S_IFMT) == S_IFREG) But on NetBSD: ((m & _S_IFMT) == _S_IFREG) Since a caller in builtin/diff.c called our macro as `S_IFREG | 0644…
Jonathan Nieder
xdiff: cast arguments for ctype functions to unsigned char The ctype functions isspace(), isalnum(), et al take an integer argument representing an unsigned character, or -1 for EOF. On platforms with a signed char, it is unsafe to pass a char to them without casting it to unsigned char first. Most of git is already shielded against this by the ctype implementation in git-compat-util.h, but xdiff, which uses libc ctype.h, ought to be fixed. Noticed-by:…
Jonathan Nieder
init: plug tiny one-time memory leak The buffer used to construct paths like ".git/objects/info" and ".git/objects/pack" is allocated on the heap and never freed. So free it. While at it, factor out the relevant code into its own function and rename the sha1_dir variable to object_directory (to match the change in everyday usage after the renaming of SHA1_FILE_DIRECTORY in v0.99~603^2~7, 2005). Noticed by valgrind while setting up…
Brandon Casey
diffcore-pickaxe.c: remove unnecessary curly braces Signed-off-by: Brandon Casey <> Signed-off-by: Junio C Hamano <>
  1. Prev
  2. Next