[PATCH v7 1/2] blame: prevent error if range ends past end of file

2018-06-15 Thread istephens
From: Isabella Stephens If the -L option is used to specify a line range in git blame, and the end of the range is past the end of the file, git will fail with a fatal error. This commit prevents such behavior - instead we display the blame for existing lines within the specified range. Tests

[PATCH v7 2/2] log: prevent error if line range ends past end of file

2018-06-15 Thread istephens
From: Isabella Stephens If the -L option is used to specify a line range in git log, and the end of the range is past the end of the file, git will fail with a fatal error. This commit prevents such behaviour - instead we perform the log for existing lines within the specified range. This

[PATCH v6 2/2] log: prevent error if line range ends past end of file

2018-05-30 Thread istephens
From: Isabella Stephens If the -L option is used to specify a line range in git log, and the end of the range is past the end of the file, git will fail with a fatal error. This commit prevents such behaviour - instead we perform the log for existing lines within the specified range. This

[PATCH v6 1/2] blame: prevent error if range ends past end of file

2018-05-30 Thread istephens
From: Isabella Stephens If the -L option is used to specify a line range in git blame, and the end of the range is past the end of the file, git will fail with a fatal error. This commit prevents such behavior - instead we display the blame for existing lines within the specified range. Tests

[PATCH v5 0/2] blame and log: prevent error if range ends past end of file

2018-05-28 Thread istephens
Okay, I think that sounds reasonable. I've amended the patch so that the line number is clipped to 1 when reading in a line range. And -L,-n is now treated the same as -L1,-n i.e. it will blame (or log) the first line of the file only.

[PATCH] blame: prevent error if range ends past end of file

2018-05-28 Thread istephens
From: Isabella Stephens If the -L option is used to specify a line range in git blame, and the end of the range is past the end of the file, git will fail with a fatal error. This commit prevents such behavior - instead we display the blame for existing lines within the specified range. Tests

[PATCH] log: prevent error if line range ends past end of file

2018-05-28 Thread istephens
From: Isabella Stephens If the -L option is used to specify a line range in git log, and the end of the range is past the end of the file, git will fail with a fatal error. This commit prevents such behaviour - instead we perform the log for existing lines within the specified range. This

[PATCH v4 2/2] log: prevent error if line range ends past end of file

2018-04-26 Thread istephens
From: Isabella Stephens If the -L option is used to specify a line range in git log, and the end of the range is past the end of the file, git will fail with a fatal error. This commit prevents such behaviour - instead we perform the log for existing lines within the

[PATCH v4 1/2] blame: prevent error if range ends past end of file

2018-04-26 Thread istephens
From: Isabella Stephens If the -L option is used to specify a line range in git blame, and the end of the range is past the end of the file, git will fail with a fatal error. This commit prevents such behavior - instead we display the blame for existing lines within the

[PATCH v4 0/2] blame and log: prevent error if range ends past end of file

2018-04-26 Thread istephens
Picking this back up after a little while. This solution means we can still accept -L, for an empty file but any other range will fail. I've made the change for both blame and log (as two separate patches). I've also changed behaviour in a couple of corner cases - before we couldn't distinguish