[GSoC] Choosing a Project Proposal

2014-03-19 Thread Brian Bourn
Hi all,

I'm Currently trying to decide on a project to work on in for Google
Summer of Code, I'm stuck choosing between three which I find really
interesting and I was wondering if any of them are particularly more
pressing then the others.  I would also love some comments on each of
these three if possible expanding on them. the three projects I'm
considering are,

1.  Unifying git branch -l, git tag -l, and git for-each-ref

2.  Refactor tempfile handling

3.  Improve triangular workflow support


Once again, I would appreciate all feedback on which of these are most
important.

Thanks for the Help,
Brian Bourn
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git 1.9.1 tarball

2014-03-19 Thread Jason St. John
On Wed, Mar 19, 2014 at 8:09 PM, 乙酸鋰 ch3co...@gmail.com wrote:

 Hi,

 Where to find git 1.9.1 tarball?
 It is not uploaded to google code.
 --

You can download a tarball for 1.9.1 from GitHub:
https://github.com/git/git/archive/v1.9.1.tar.gz

Jason
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 2/2] log: add --show-linear-break to help see non-linear history

2014-03-19 Thread Nguyễn Thái Ngọc Duy
Option explanation is in rev-list-options.txt. The interaction with -z
is left undecided.

Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 * Revert back to the old option name --show-linear-break
 * Get rid of saved_linear, use another flag in struct object instead
 * Fix not showing the break bar after a root commit if the dag graph
   has multiple roots
 * Make it work with --graph (although I don't really see the point of
   using both at the same time)
 * Let the next contributor deal with -z

 Documentation/rev-list-options.txt |  7 ++
 log-tree.c |  9 
 object.h   |  2 +-
 revision.c | 45 +++---
 revision.h |  9 +++-
 5 files changed, 67 insertions(+), 5 deletions(-)

diff --git a/Documentation/rev-list-options.txt 
b/Documentation/rev-list-options.txt
index 9a3da36..b813961 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -758,6 +758,13 @@ This enables parent rewriting, see 'History 
Simplification' below.
 This implies the `--topo-order` option by default, but the
 `--date-order` option may also be specified.
 
+--show-linear-break[=barrier]::
+   When --graph is not used, all history branches are flattened
+   which can make it hard to see that the two consecutive commits
+   do not belong to a linear branch. This option puts a barrier
+   in between them in that case. If `barrier` is specified, it
+   is the string that will be shown instead of the default one.
+
 ifdef::git-rev-list[]
 --count::
Print a number stating how many commits would have been
diff --git a/log-tree.c b/log-tree.c
index 5ce217d..c51a878 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -805,12 +805,21 @@ int log_tree_commit(struct rev_info *opt, struct commit 
*commit)
if (opt-line_level_traverse)
return line_log_print(opt, commit);
 
+   if (opt-track_linear  !opt-linear  !opt-reverse_output_stage) {
+   if (opt-graph)
+   graph_show_padding(opt-graph);
+   else
+   puts(\n);
+   printf(%s\n, opt-break_bar);
+   }
shown = log_tree_diff(opt, commit, log);
if (!shown  opt-loginfo  opt-always_show_header) {
log.parent = NULL;
show_log(opt);
shown = 1;
}
+   if (opt-track_linear  !opt-linear  opt-reverse_output_stage)
+   printf(\n%s\n, opt-break_bar);
opt-loginfo = NULL;
maybe_flush_or_die(stdout, stdout);
return shown;
diff --git a/object.h b/object.h
index 768490b..9ee1959 100644
--- a/object.h
+++ b/object.h
@@ -28,7 +28,7 @@ struct object_array {
 #define TYPE_BITS   3
 /*
  * object flag allocation:
- * revision.h:  0--10
+ * revision.h:  0--10 26
  * fetch-pack.c:0---4
  * walker.c:0-2
  * upload-pack.c: 11-19
diff --git a/revision.c b/revision.c
index 78b5c3a..b9afdce 100644
--- a/revision.c
+++ b/revision.c
@@ -1831,6 +1831,18 @@ static int handle_revision_opt(struct rev_info *revs, 
int argc, const char **arg
revs-notes_opt.use_default_notes = 1;
} else if (!strcmp(arg, --show-signature)) {
revs-show_signature = 1;
+   } else if (!strcmp(arg, --show-linear-break) ||
+  starts_with(arg, --show-linear-break=)) {
+   if (starts_with(arg, --show-linear-break=))
+   revs-break_bar = xstrdup(arg + 20);
+   else
+   revs-break_bar = ..;
+   revs-track_linear = 1;
+   /*
+* make track_linear() not a break bar before the
+* first shown commit.
+*/
+   commit_list_insert(NULL, revs-previous_parents);
} else if (starts_with(arg, --show-notes=) ||
   starts_with(arg, --notes=)) {
struct strbuf buf = STRBUF_INIT;
@@ -2896,6 +2908,22 @@ enum commit_action simplify_commit(struct rev_info 
*revs, struct commit *commit)
return action;
 }
 
+static void track_linear(struct rev_info *revs, struct commit *commit)
+{
+   struct commit_list *p;
+   for (p = revs-previous_parents; p; p = p-next)
+   if (p-item == NULL || /* first commit */
+   !hashcmp(p-item-object.sha1, commit-object.sha1))
+   break;
+   revs-linear = p != NULL;
+   if (revs-reverse) {
+   if (revs-linear)
+   commit-object.flags |= TRACK_LINEAR;
+   }
+   free_commit_list(revs-previous_parents);
+   revs-previous_parents = copy_commit_list(commit-parents);
+}
+
 static struct commit *get_revision_1(struct rev_info *revs)
 {
if (!revs-commits)
@@ -2935,6 +2963,8 @@ static struct 

[PATCH v3 1/2] object.h: centralize object flag allocation

2014-03-19 Thread Nguyễn Thái Ngọc Duy
While the field flags is mainly used by the revision walker, it is
also used in many other places. Centralize the whole flag allocation to
one place for a better overview (and easier to move flags if we have
too).

Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 The next step could be define (instead of document) all of them in
 a single place. But that may result in naming conflicts and stuff
 for little gain.

 bisect.c|  3 +--
 builtin/blame.c |  2 +-
 bundle.c|  1 +
 commit.c|  2 +-
 fetch-pack.c|  1 +
 http-push.c |  3 +--
 object.h| 13 +
 revision.h  |  1 +
 sha1_name.c |  2 ++
 upload-pack.c   |  2 +-
 walker.c|  1 +
 11 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/bisect.c b/bisect.c
index 8448d27..d6e851d 100644
--- a/bisect.c
+++ b/bisect.c
@@ -21,8 +21,7 @@ static const char *argv_checkout[] = {checkout, -q, NULL, 
--, NULL};
 static const char *argv_show_branch[] = {show-branch, NULL, NULL};
 static const char *argv_update_ref[] = {update-ref, --no-deref, 
BISECT_HEAD, NULL, NULL};
 
-/* bits #0-15 in revision.h */
-
+/* Remember to update object flag allocation in object.h */
 #define COUNTED(1u16)
 
 /*
diff --git a/builtin/blame.c b/builtin/blame.c
index e5b5d71..88cb799 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -74,7 +74,7 @@ static unsigned blame_copy_score;
 #define BLAME_DEFAULT_MOVE_SCORE   20
 #define BLAME_DEFAULT_COPY_SCORE   40
 
-/* bits #0..7 in revision.h, #8..11 used for merge_bases() in commit.c */
+/* Remember to update object flag allocation in object.h */
 #define METAINFO_SHOWN (1u12)
 #define MORE_THAN_ONE_PATH (1u13)
 
diff --git a/bundle.c b/bundle.c
index a85e0e4..1222952 100644
--- a/bundle.c
+++ b/bundle.c
@@ -120,6 +120,7 @@ static int list_refs(struct ref_list *r, int argc, const 
char **argv)
return 0;
 }
 
+/* Remember to update object flag allocation in object.h */
 #define PREREQ_MARK (1u16)
 
 int verify_bundle(struct bundle_header *header, int verbose)
diff --git a/commit.c b/commit.c
index 0f28902..f479331 100644
--- a/commit.c
+++ b/commit.c
@@ -721,7 +721,7 @@ void sort_in_topological_order(struct commit_list **list, 
enum rev_sort_order so
 
 /* merge-base stuff */
 
-/* bits #0..15 in revision.h */
+/* Remember to update object flag allocation in object.h */
 #define PARENT1(1u16)
 #define PARENT2(1u17)
 #define STALE  (1u18)
diff --git a/fetch-pack.c b/fetch-pack.c
index f061f1f..fd470e7 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -26,6 +26,7 @@ static int agent_supported;
 static struct lock_file shallow_lock;
 static const char *alternate_shallow_file;
 
+/* Remember to update object flag allocation in object.h */
 #define COMPLETE   (1U  0)
 #define COMMON (1U  1)
 #define COMMON_REF (1U  2)
diff --git a/http-push.c b/http-push.c
index d4b40c9..f2c56c8 100644
--- a/http-push.c
+++ b/http-push.c
@@ -64,8 +64,7 @@ enum XML_Status {
 #define LOCK_TIME 600
 #define LOCK_REFRESH 30
 
-/* bits #0-15 in revision.h */
-
+/* Remember to update object flag allocation in object.h */
 #define LOCAL(1u16)
 #define REMOTE   (1u17)
 #define FETCHING (1u18)
diff --git a/object.h b/object.h
index 732bf4d..768490b 100644
--- a/object.h
+++ b/object.h
@@ -26,6 +26,19 @@ struct object_array {
 #define OBJECT_ARRAY_INIT { 0, 0, NULL }
 
 #define TYPE_BITS   3
+/*
+ * object flag allocation:
+ * revision.h:  0--10
+ * fetch-pack.c:0---4
+ * walker.c:0-2
+ * upload-pack.c: 11-19
+ * builtin/blame.c:  12-13
+ * bisect.c:  16
+ * bundle.c:  16
+ * http-push.c:   16-19
+ * commit.c:  16-19
+ * sha1_name.c:20
+ */
 #define FLAG_BITS  27
 
 /*
diff --git a/revision.h b/revision.h
index 1eb94c1..0262bbd 100644
--- a/revision.h
+++ b/revision.h
@@ -7,6 +7,7 @@
 #include commit.h
 #include diff.h
 
+/* Remember to update object flag allocation in object.h */
 #define SEEN   (1u0)
 #define UNINTERESTING   (1u1)
 #define TREESAME   (1u2)
diff --git a/sha1_name.c b/sha1_name.c
index 6fca869..2b6322f 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -819,6 +819,8 @@ static int get_sha1_1(const char *name, int len, unsigned 
char *sha1, unsigned l
  * For future extension, ':/!' is reserved. If you want to match a message
  * beginning with a '!', you have to repeat the exclamation mark.
  */
+
+/* Remember to update object flag allocation in object.h */
 #define ONELINE_SEEN (1u20)
 
 static int handle_one_ref(const char *path,
diff --git a/upload-pack.c b/upload-pack.c
index 9314c25..27df12f 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -17,7 +17,7 @@
 
 static const char upload_pack_usage[] = git upload-pack [--strict] 
[--timeout=n] dir;
 
-/* bits #0..7 in revision.h, #8..10 in commit.c 

[PATCH] Rewritten fsck.c:fsck_commit() through using starts_with() instead of memcmp()

2014-03-19 Thread blacksimit
Hi, I've done a microproject, number 15, Rewrite fsck.c:fsck_commit() to use 
starts_with() and/or skip_prefix(). I used only starts_with().

memcmp() returns 0 when both are equal, therefore when replacing with 
starts_with() , I used ! or deleted where appropriate.

I plan to apply for the GSoC 2014. I expect your feedbacks!

Signed-off-by: Oguzhan Unlu cengoguzhanu...@gmail.com
---
 fsck.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fsck.c b/fsck.c
index 64bf279..d43be98 100644
--- a/fsck.c
+++ b/fsck.c
@@ -290,12 +290,12 @@ static int fsck_commit(struct commit *commit, fsck_error 
error_func)
int parents = 0;
int err;
 
-   if (memcmp(buffer, tree , 5))
+   if (!starts_with(buffer, tree ))
return error_func(commit-object, FSCK_ERROR, invalid format 
- expected 'tree' line);
if (get_sha1_hex(buffer+5, tree_sha1) || buffer[45] != '\n')
return error_func(commit-object, FSCK_ERROR, invalid 'tree' 
line format - bad sha1);
buffer += 46;
-   while (!memcmp(buffer, parent , 7)) {
+   while (starts_with(buffer, parent )) {
if (get_sha1_hex(buffer+7, sha1) || buffer[47] != '\n')
return error_func(commit-object, FSCK_ERROR, invalid 
'parent' line format - bad sha1);
buffer += 48;
@@ -322,13 +322,13 @@ static int fsck_commit(struct commit *commit, fsck_error 
error_func)
if (p || parents)
return error_func(commit-object, FSCK_ERROR, parent 
objects missing);
}
-   if (memcmp(buffer, author , 7))
+   if (!starts_with(buffer, author ))
return error_func(commit-object, FSCK_ERROR, invalid format 
- expected 'author' line);
buffer += 7;
err = fsck_ident(buffer, commit-object, error_func);
if (err)
return err;
-   if (memcmp(buffer, committer , strlen(committer )))
+   if (!starts_with(buffer, committer ))
return error_func(commit-object, FSCK_ERROR, invalid format 
- expected 'committer' line);
buffer += strlen(committer );
err = fsck_ident(buffer, commit-object, error_func);
-- 
1.9.1.286.g5172cb3

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


<    1   2